Commit Graph

64 Commits

Author SHA1 Message Date
da61b8d541 Brute force part 2 2023-12-21 19:03:17 +01:00
37c578d7cc Implement 2023 day 20 part 1 2023-12-20 23:00:12 +01:00
cb05450229 Remove useless Clone impl 2023-12-19 23:55:10 +01:00
70e7747027 Implement 2023 day 19 part 2 2023-12-19 23:44:41 +01:00
2070a6b726 Implement 2023 day 19 part 1 2023-12-19 19:16:02 +01:00
24430cf1da Implement 2023 day 18 part 2
This was not at all the twist I expected, but I like it.
2023-12-18 20:52:05 +01:00
8faabf1220 Prepare for part 2 2023-12-18 20:32:38 +01:00
f15c8fbec3 Implement 2023 day 18 part 1 2023-12-18 20:26:01 +01:00
353e551f66 Implement 2023 day 17 part 2 2023-12-17 19:41:45 +01:00
717417eaf0 Implement 2023 day 17 part 1 2023-12-17 19:04:01 +01:00
d78d74c92d Implement 2023 day 16 part 2 2023-12-16 12:03:08 +01:00
c2389e93af Implement 2023 day 16 part 1 2023-12-16 11:38:50 +01:00
682e6f06b8 Flatten DP buffers
Going from 2d to 1d arrays improves cache locality and vectorization,
resulting in a roughly 40% speedup for part 2.
2023-12-15 17:39:59 +01:00
673e8184ed Zero init > 1 init 2023-12-15 09:03:06 +01:00
6657519179 Why have many hash map when few do trick 2023-12-15 08:54:02 +01:00
f898ffd216 Implement 2023 day 15 part 1 2023-12-15 08:45:19 +01:00
862ef3840c Implement 2023 day 15 part 1 2023-12-15 08:06:19 +01:00
44a1bcdc62 Merge owned and non-owned grids
Through the power of generics. Should've been easier if it was possible
to be generic over mutable and non-mutable, but AsRef/AsMut is close
enough
2023-12-14 21:33:09 +01:00
b7baebd050 Very clunky implementation of 2023 day 14 part 2 2023-12-14 20:05:25 +01:00
4f67ce4891 mplement 2023 day 14 part 1 2023-12-14 08:37:07 +01:00
975a1f8faf Misc fixes 2023-12-13 18:41:15 +01:00
0c4430ad01 Implement 2023 day 13 part 2 2023-12-13 18:33:09 +01:00
0838646973 Implement 2023 day 13 part 1 2023-12-13 18:21:19 +01:00
e449672487 Reduce dimensions of DP memo
We don't actually need all days, we just need the previous to build the
next
2023-12-12 18:14:32 +01:00
83d14af4f3 Missing sample 2023-12-12 12:20:13 +01:00
ec80523cac Implement 2023 day 12 2023-12-12 12:16:03 +01:00
06894b3455 Implement 2023 day 11 part 2 2023-12-11 08:54:33 +01:00
fb7e6d0a92 Implement 2023 day 11 part 1 2023-12-11 08:48:37 +01:00
43bf260887 Implement 2023 day 10 part 2 2023-12-10 11:45:18 +01:00
f1b23b0116 Implement 2023 day 10 part 1 2023-12-10 10:38:16 +01:00
126eeb7587 Move grid code to common 2023-12-10 09:59:19 +01:00
ee2ff35609 Remove most allocations from the code path 2023-12-09 19:42:20 +01:00
92c985cbd4 Unify part 1 and 2 better 2023-12-09 19:10:01 +01:00
de440ef10e Implement 2023 day 9 2023-12-09 10:52:23 +01:00
cfea20bed3 Implement 2023 day 8 part 2 2023-12-08 08:11:04 +01:00
8f6937ae42 Implement 2023 day 8 part 1 2023-12-08 07:14:36 +01:00
2d2be463d1 Avoid unnecessary floor 2023-12-07 21:52:37 +01:00
e1c23385c9 Replace binary search with maths 2023-12-07 21:45:20 +01:00
f5ca9af74b Clarify order of operations 2023-12-07 21:08:05 +01:00
de24e8b489 Replace sort with counting sort 2023-12-07 21:03:41 +01:00
64f10ff04d Fixed 2023 day 7 2023-12-07 20:48:22 +01:00
cb5af961bc Incorrect 2023 day 7 part 2
But it passes the tests, so I might as well push it.
2023-12-07 09:25:03 +01:00
164383efb7 Implement 2023 day 7 part 1 2023-12-07 09:04:45 +01:00
d2e1ad50d2 Off by one 2023-12-06 13:34:25 +01:00
bfed992b7d Binary search is best search 2023-12-06 08:53:55 +01:00
b3ccfb7a7d Implement 2023 day 6 part 2 2023-12-06 08:45:49 +01:00
4183f4a242 Implement 2023 day 6 part 1 2023-12-06 08:29:41 +01:00
018d41e753 Proper implementation for 2023 day 5 part 2 2023-12-05 19:15:41 +01:00
63c1024d22 Brute force day 2023 day 5 part 2 2023-12-05 09:10:16 +01:00
b7797c40aa Implement 2023 day 5 part 1 2023-12-05 09:01:00 +01:00