15
๐ฎ - 2024 DAY 10 SOLUTIONS - ๐ฎ
(programming.dev)
An unofficial home for the advent of code community on programming.dev! Other challenges are also welcome!
Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
Everybody Codes is another collection of programming puzzles with seasonal events.
Solution Threads
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 |
Icon base by Lorc under CC BY 3.0 with modifications to add a gradient
console.log('Hello World')
C
Tried a dynamic programming kind of thing first but recursion suited the problem much better.
Part 2 seemed incompatible with my visited list representation. Then at the office I suddenly realised I just had to skip a single if(). Funny how that works when you let things brew in the back of your mind.
Code
:
https://github.com/sjmulder/aoc/blob/master/2024/c/day10.c
That's a lovely minimalist solution. I couldn't even see where the solution was on my first read-through.
I bet that search would look cool visualized.
Here it is! https://sjmulder.nl/2024/aoc-day10.mp4
Oooh! Pretty!