3 ms·
I worked on a lot of previous AoC problems in November and then did AoC 2021 in December. I should do a little write-up because there are definitely patterns th
by smcl 5y ago
I worked on a lot of previous AoC problems in November and then did AoC 2021 in December. I should do a little write-up because there are definitely patterns that repeat, but one thing I noticed was that if you're doing them in Python then the "heapq" module is sometimes so useful it feels like cheating. There are many problems where as long as you have a simple brute force algorithm and a way to rank potential solutions, you're mostly done.
- EnderShadow8 5y agoIf it works, it works. Priority queues are an extremely powerful data structure if you leverage them right. I find C++'s set and map and related data structures are also very useful for solving cp problems.
- smcl 5y agooh yeah it goes without saying that Python dicts and sets are my AOC bread and butter :D