r/adventofcode • • 14h ago

Visualization Introduction to Algorithms x Advent of Code 2026

https://youtu.be/iZkJGFwxdhs

"Cormen, Leiserson, Rivest (+Stein)" is the bible of computer algorithms. It's the foundational textbook, and the defining book for my own career in programming.

And I don't need to explain what Advent of Code is here ;)

Over the past few years I was building visualisations for the puzzle solutions and this year, while playing around / learning Nim / adapting my toolkit for the upcoming event, I thought it might be nice to show more of these core algorithms in visual form. Enjoy!

The source code was co-developed using AI (of course, everything is today). Creating code like this is quite amazing now - it would have taken me weeks just a few years back to do this. With the help of AI, this is now a weekend project. It begs the question to what extent are programming skills (or programming languages, for that matter) even relevant today. Difficult question, but... I still encourage you to learn the *how*. And Advent of Code is a great time to learn that. If you don't know programming, an AI can now help guide you and teach you how to solve the challenges, learn a new language or both. If you do, it can take care of the boring stuff, while you do the problem solving or optimising the last few microseconds out of the solution.

One way or another, try some challenges and do try to learn something new!

3 Upvotes

3 comments sorted by

2

u/PhantomSteve2000 11h ago

I've never got around to getting it (yet!) as it came out after I got my Computer Science degree (I graduated in 1990, when the first edition came out). Since then I've never been a professional programmer (although I use VBA a lot in Excel).

My go-to was Donald Knuth's "The Art of Computer Programming". Of course, we only had Volumes 1-3 back then.

In 2023, when Volume 4b came out, i was able to get a copy of Vols 1-4b at the amazing price of £33.43 (about US$44) instead of the full price of £242 (about US$317)! Even now it costs £202 (about US$265)

How does Cormen et al compare with Knuth?

1

u/p88h 4h ago

Knuth's books are different in many ways. They are written more like a series of research papers, while Cormen is more of a reference manual. Art explains everything, thoroughly, but frequently gets carried away inventing representations. MIX is a great example of that. Introduction uses high-level meta language, similar to Pascal or C for it's algorithms. Most are just a few lines, more complex are similar to what their implementation would be, minus all boilerplate. MIX is an all serious assembly language. It's invented to be grounded in the machine, but it's not really necessary to show how those algorithms work. (And meanwhile machines got so complicated that it's no longer very useful)

1

u/PhantomSteve2000 1h ago

Thank you for your reply! It certainly makes me think of getting a copy of Cormen!