06c006d5bd
2024 day 16 part 1
2024-12-16 09:33:28 +00:00
1ab16668f4
Tidy up 2024 day 15
2024-12-15 09:01:56 +00:00
73c86520bf
2024 day 15 part 2
2024-12-15 08:39:54 +00:00
70c53d5173
2024 day 15 part 1
2024-12-15 08:10:42 +00:00
499243c6eb
Tidy up 2024 day 14 code.
2024-12-14 09:00:00 +00:00
2afe323aec
2024 day 14 part 2
2024-12-14 08:48:36 +00:00
ccf4847c2b
2024 day 14 part 1
2024-12-14 08:16:22 +00:00
75f9ac6975
2024 day 13 part 2
2024-12-13 18:43:09 +00:00
8d7c14a707
2024 day 13 part 1
2024-12-13 09:16:31 +00:00
932b2c926c
Tidy up code for 2024 day 12.
...
This still has some mutable state.
2024-12-12 10:23:08 +00:00
7e0e6d3770
2024 day 12 part 2
2024-12-12 09:49:19 +00:00
46755cea34
2024 day 12 part 1.
2024-12-12 08:58:13 +00:00
c81de6e642
Tidy up 2024 day 11 code.
2024-12-11 15:45:27 +00:00
fcc4341237
Update to use Aoc.pow10 and Aoc.digits10.
2024-12-11 09:17:12 +00:00
2159a5fc5e
Performant solution to 2024 day 11.
...
We notice that we're repeating calculations at each step, so use a
map to ensure we do each stone ID once per step.
2024-12-11 09:16:57 +00:00
8bfe33fece
Add pow10, log10i and digits10 functions
...
These are used by a couple of solutions now.
2024-12-11 09:16:08 +00:00
b9e3907e4d
Day 2024 day 11 part 1 and incredibly slow part 2
2024-12-11 08:07:26 +00:00
b2e56f802e
Move to use Aoc.Grid
2024-12-10 11:31:37 +00:00
fe93f65f6a
Moved Grid to Aoc module.
2024-12-10 11:31:02 +00:00
76dc338c9a
Tidy up code for 2024 day 10.
2024-12-10 09:20:50 +00:00
dbc723e2d1
2024 day 10
2024-12-10 09:06:07 +00:00
5094e92d31
Tidy up code for 2024 day 9
...
Not happy that mutable state is being used. But this seems to be the
simplest way, and is efficient.
2024-12-09 16:58:46 +00:00
02e1e3b8b6
2024 day 9 part 1.
2024-12-09 15:48:11 +00:00
6d551f5497
Remove mutable state from day 8 of 2024.
2024-12-08 09:15:45 +00:00
b9af6249a3
2024 day 8 part 2.
2024-12-08 08:36:02 +00:00
71c5b5e5a2
2024 day 8 part 1
2024-12-08 08:09:20 +00:00
54f14c0492
Simplify the code for 2024 day 7
...
Simplify may be in the eye of the beholder here.
This reduces code duplication, as both parts are effectively the same.
Part 2 just has an extra operation that can be carried out.
2024-12-07 18:13:06 +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
8a454e2082
Add 2024 day 7.
2024-12-07 07:29:03 +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
590637e0de
Upgrade Ocamlformat version.
2024-12-06 15:42:18 +00:00
7b51696740
Flush stdout between each part.
...
This helps indicate where we have reached in case of problems.
2024-12-06 15:42:00 +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
c6fb838463
Make ints_of_string generic and move to lib.
2024-12-05 15:43:18 +00:00
3052751eb6
Improve dune-project dependency specifications.
2024-12-05 11:31:44 +00:00
7508e7a9ea
Use Hashtbl generic interface.
2024-12-05 11:30:44 +00:00
137ef06d9d
move 2405 to use a hash table.
2024-12-05 11:26:38 +00:00
cbc5c808f5
Merge branch 'main' of ssh://gitea.gretton-dann.synology.me:10022/mgrettondann/ocaml-aoc
2024-12-05 09:18:12 +00:00
98a30229e4
2024 day 5 both parts.
2024-12-05 09:16:59 +00:00
84edd255fa
2024 day 5 both parts.
2024-12-05 09:06:31 +00:00
4d6a0683bf
Make 2402 part 2 more idiomatic.
2024-12-04 16:28:58 +00:00
003fac75d6
2024 day 4 part 2.
...
Not happy with this part - not so functional.
2024-12-04 15:30:05 +00:00
374a16befe
2024 day 4 part 1.
2024-12-04 09:24:45 +00:00
fbe531a10c
Add README.
2024-12-03 16:37:47 +00:00
c8b0f5d61c
Update package descriptions
2024-12-03 16:32:26 +00:00
4c41fd05f5
Comments and function renames.
2024-12-03 16:32:14 +00:00
1f99f23c92
Use variants for day 3.
2024-12-03 15:38:53 +00:00
2ee7f6a3d3
Rename functions to be more idiomatic.
2024-12-03 08:53:02 +00:00