4
votes
Day 19: Linen Layout
Today's problem description: https://adventofcode.com/2024/day/19
Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python
with any of the "short names" listed in this page of supported languages):
<details>
<summary>Part 1</summary>
```python
Your code here.
```
</details>
Still in the cooldown period, I see. Didn't mind the easier puzzle, though. The only "trick" to this was using memoization so it could finish in a reasonable time.
Solution (Jai)
Hard to complain, but this felt far easier than previous day 19s. I think I might just be biased having done enough coding puzzles in the past that I've probably done something similar a half dozen times.
Nothing special about the solution, just recursively solving each string by testing all the prefixes, caching results for part 2.
Smalltalk Solution
Very nice and relaxing puzzle.
Part 1 (Rust)
Part 2 (Rust)