6 Commits

Author SHA1 Message Date
b2e56f802e Move to use Aoc.Grid 2024-12-10 11:31:37 +00:00
799a25464b Do not use a set to record blocks in 2406.ml
Instead of using a set of locations to store the blocks in day2406.ml
return to using a string.

Sets have an O(lg n) lookup time in number of blocks.

Instead we use a single string which contains the whole map, which means
we can do O(1) lookup on a block.  This significantly improves
performance.
2024-12-07 10:12:50 +00:00
831bbf4f63 Move IntPair and PosSet into Aoc library.
These are obviously generic enough and useful for the future that they
can be moved to a shared library.
2024-12-06 17:15:37 +00:00
38d0781c7e Reimplement 2024 day 6 to use a set.
This seems "better" from a functional perspective.  However, it runs
substantially slower for part 2.
2024-12-06 16:26:32 +00:00
7fbad713c3 2024 day 6 part 2 2024-12-06 15:41:18 +00:00
1436db73fb 2024 day 6 part 1 2024-12-06 09:20:41 +00:00