Advent of Code 2024

I just return a space character. I wouldn't have considered a dictionary, that's clever. I was going to ask about performance, but I don't think grid accesses are a problem with my horrible brute force solutions.


Speaking of 'horrible brute force solutions' doing these puzzles have given me an appreciation for how easily Swift lets me take a solution and subject all cores to my stupidity.

Main stumbling block was figuring out that this error message

was trying to say "grid is mutable, it might change by the time this task is running". But hey, I've spent enough years writing C++ that I should be used to cryptic error messages at this point. :slight_smile:


Edit: I left the Ocean Boiler running all morning and got no results.

Spoilers for Day 20, part 1

Of course, once I sat down and thought about what I was doing, I realised that you can just modify the previous graph that the Dijkstra algorithm outputs and it took 9 seconds to get the answer.

1 Like