mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-07 02:28:40 +00:00
Speed up Day 12 by the power of MANAGING YOUR OWN MEMORY (#17)
This commit is contained in:
@@ -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>]
|
||||
|
Reference in New Issue
Block a user