Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use a custom Python preprocessor for Advent of Code (n.b. I don't come very close to winning). It definitely beats writing pure Python for me but given that I only use it once a year it's hard to keep all of it in my head. So YMMV, I guess.

IMO, high-speed competitive programming is part knowing your tools well, but also a lot about coming up with abstractions on the fly very quickly. If you watch the top Advent of Code solvers they'll carve up the problem in seconds, and they're really good at picking just the right amount of complexity for the problem at hand and not investing any more than that. Coupling that with a touch of cleverness ("let's eval the input", "who needs a tree when I can shove everything into a dictionary") and a very low error rate (I would hit the leaderboard but almost always lose a significant time to debugging…) and they come out on top.



> If you watch the top Advent of Code solvers they'll carve up the problem in seconds, and they're really good at picking just the right amount of complexity for the problem at hand…

Any recommendations of who/where to watch? I’d love to see what their process looks like.


https://youtube.com/@jonathanpaulson5053 is usually near the top of the leaderboard and takes time to explain his approach after each solve


Sure, here's an example of a speedrun (done after the fact): https://www.twitch.tv/videos/854280596




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: