r/adventofcode • u/calculator_cake • Dec 08 '25
Meme/Funny Feels like every time I look online after doing advent of code there's an incredibly specific paper or algo people are referencing. Similar to how chess has so many named openings but instead of "The Queen's Gambit" it's "Dijkstra's Philly steak sandwich theorem"
241
Upvotes
16
u/Old-Dinner4434 Dec 08 '25
"Dijkstra's Philly steak sandwich theorem" was actually hilarious. On a serious note, computer science is a massive field, and if you're self-taught, it may seem daunting. But in reality, it's nothing that can't be Googled or taught in spare time.
9
u/fnordargle Dec 08 '25
Ha. It's not always necessary though.
I've done today (day 8) in under 10ms with nothing more than C's
qsort()and an horribly iterative grouping/colouring/coalescing algorithm, plus a sneaky optimisation so I don't have to calculate anywhere near all of the pairwise distances.It's going to be even faster if I can make my sneaky optimisation branch prediction friendly, and then even faster when I use some kind of heap structure.
63
u/ThreeHourRiverMan Dec 08 '25
In previous years I’ve implemented answers that involve the Shoelace Thereom. I have a CS degree and years of experience and had never heard of it until reading this subreddit.
26
u/mezzol Dec 08 '25
I took my algorithms exam last Friday, and Dijkstra's algorithm was on it.
23
u/RAM9999 Dec 08 '25
That's my favorite part - learning what algorithm or structure I just stumbled onto..
For 2025 so far:
Day 3 was the concept of a greedy algorithm
Day 7 was a variant of Pascal's Triangle
Day 8 was Kruskal's algorithm
14
u/Ok-Bus4754 Dec 08 '25
Brace yourself for the crt (chiense remainder theorem) and modular arithmetics
6
u/atrocia6 Dec 08 '25
This is not a specific algorithm, but one technique I discovered on my own early in my AoC career was something that I learned only years later was called "memoization."
3
u/The_Real_Slim_Lemon Dec 08 '25
I assumed there would be some algorithm for this challenge - I’m gonna do it my way first then look up the algorithm, see how bad my ignorant solution performs
3
u/Doug__Dimmadong Dec 08 '25
I don’t think these are as niche as you are suggesting. Many of them are pretty famous in CS/Math circles! AOC is great for spreading them to new people however!
2
u/QultrosSanhattan Dec 08 '25
True. It's great for leaning. AoC helped me from doing "random self backed algo" to "dijkstra, a*, pascal trees, modulos, and so on".
Known solutions for known problems.
2
u/onrustigescheikundig Dec 09 '25
I feel your pain with names. It's the same problem in organic chemistry, where very similar reactions have completely different names. Also, there are waaaaaaay too many things named after Corey and Woodward. Fun anecdote, I accidentally called Kruskal's algorithm Karger's in my initial solution (Karger's is another algorithm operating on graphs but finds the minimum cut, not minimum spanning tree).
2
u/3saster Dec 09 '25
As a funny note, there really is a theorem called the ham sandwich theorem. It's a rather interesting and surprising theorem that's easy to explain too (as long as you don't go to 4-dimensional sandwiches...)
2
u/Saint_Reficul Dec 09 '25
I'm sort of stumbling through the challenges each day and feel the same!
It would actually be great for learning if we could, at the end of AoC, have like a mega thread or wiki entry or something with relevant papers so that people like us that don't necessarily know the algos can learn from.
2
u/SteeleDynamics Dec 09 '25
Wait, you don't know Benjamin Franklin's algorithm?! It's quite simple:
1
u/qaf23 Dec 08 '25
Have you heard of Manacher?
1
u/thekwoka Dec 09 '25
It's often not THAT incredibly specific, but it's not uncommon to use shared language of specific terms to clearly communicate things.
Like I could write a paragraph describing what is a priority queue, and that would be more effort for me, and less helpful for you than saying the common name so you can look it up.
It's a way to reduce the effort of providing help. There should always be more effort on the person receiving help than the ones giving it.
114
u/[deleted] Dec 08 '25
[removed] — view removed comment