3 Commits

Author SHA1 Message Date
Jack Jackson
8770497049 Solution to 21-1
Phewf - this was a tough one! As I call out in the comments on 21.zig,
I had cracked _most_ of the shortcutting to this, but hadn't noticed
that choice of order-of-operations was not arbitrary - needed to notice
that doing a < before a ^ ends up more efficient than the other way
around, for instance.

I shudder to think what part 2 is going to be like...

For the record, my attempts at this took 1253 lines, over two files -
considering my total line count so far is 6233, that's over one-fifth.
Wild!
2025-01-28 22:56:28 -08:00
Jack Jackson
ba85344b3d Partial solution to 21-1
Got the ability to generate a set of directional-pushes that lead to a
numerical input. Now we "just" need to do the same thing for
directional-to-directional, then plumb them together, then we're done.
Easy, right? :P
2025-01-27 23:14:56 -08:00
Jack Jackson
36abfed74c Committing to save
Getting a `bus error` when running tests, which googling hasn't really
helped me to understand.

Ohhh, just realized - it's because some of those `[]const []const u8`s
_aren't_ initialized with the `allocator`, so we shouldn't be freeing
them. Ugh.
2025-01-23 23:41:38 -08:00