adventofcode-0.1.0.0: Haskell solutions to adventofcode
LicenseMIT
Maintainer@tylerjl
Safe HaskellSafe-Inferred
LanguageHaskell2010

Y2021.D06

Description

Solutions to the 2021 day 06 set of problems for adventofcode.com.

Synopsis

Documentation

part6A :: Text -> Int #

Solve part A

part6AMV :: Text -> Int #

Solve part A, with unboxed mutable vectors

part6ASeq :: Text -> Int #

Solve part A, with sequences

part6B :: Text -> Int #

Solve part B

part6BMV :: Text -> Int #

Solve part B, with unboxed mutable vectors

part6BSeq :: Text -> Int #

Solve part B, with sequences

solve6MV :: Int -> [Int] -> Int #

Solution algorithm using super aggressive mutable unboxed vectors.

solve6 :: Int -> [Int] -> Int #

Iterate for a given number of days given a starting value and return the total.

breed :: Num a => IntMap a -> IntMap a #

Simulate one day passing for the collection of fish.

parseFish :: Text -> [Int] #

Parse puzzle input into a list of Ints.

parseFish' :: Text -> [Int] #

Parse puzzle input into a list of Ints but do so with a dumb parser.

parseFish'' :: Text -> [Int] #

Parse puzzle input into a list of Ints but do so with a dumb parser.