Speed up Day 12 by the power of MANAGING YOUR OWN MEMORY (#17)

This commit is contained in:
Patrick Stevens
2022-12-11 15:06:53 +00:00
committed by GitHub
parent d323984a12
commit e73c352fa7
2 changed files with 100 additions and 36 deletions

View File

@@ -41,15 +41,6 @@ Monkey 3:
let ``Part 1, given`` () =
Day11.part1 (StringSplitEnumerator.make '\n' input) |> shouldEqual 10605
[<Test>]
let ``Part 1, single round, given`` () =
let monkeys = Day11.parse (StringSplitEnumerator.make '\n' input)
let inspections = Array.zeroCreate monkeys.Length
Day11.oneRoundDivThree monkeys inspections
inspections |> shouldEqual [| 2 ; 4 ; 3 ; 5 |]
[<Test>]
let ``Part 1`` () =
let input = Assembly.readResource "Day11.txt"
@@ -58,7 +49,7 @@ Monkey 3:
[<Test>]
let ``Part 2, given 1`` () =
let ``Part 2, given`` () =
Day11.part2 (StringSplitEnumerator.make '\n' input) |> shouldEqual 2713310158L
[<Test>]