Module advent2021::day07 [−][src]
Expand description
Day 7: The triangle number formula helps tidy up the code here. I am nearly certain that the answer for part 2 has to occur near the average, but I don’t have a full proof of this hunch. Sorting is the bottleneck, but using an unstable sort helps somewhat.