My adventures with Advent of Code, written in PHP. You can explore some of the solutions below:
- Some serious shit is going on at the North Pole
- Ugh, a very traumatic challenge
- Help! Some goblins surrounded me in a cavern
- There are some carts running in circles along the drawn path!
- Usage of the Summed-area Table algo (and a nice visualization)
- Blink and you miss it — animating stars in outer space
- How next solutions become just a higher-level abstraction over existing realms
- Implementing disk defragmentator — with some nice and colourful animations
- The visualizations become animated and colored!
- Finding isolated groups within a larger set of connected members
- Plotting some graphs — as well as an optimization of two orders of magnitude
- Nice and simple trick to simplify the problem
- Writing a parser — not really required to solve the task, but a very fun and rewarding solution.
- Smart solution to the spiral case — visualizing the problem and some nice maths to come up with an elegant solution
- Solving a maze — once again, standing on the shoulders of giants — reusing maps and pathfinding, with nice visualization to accompany it.
- Optimizing the compiler — reusing the existing
Processor
implementation to detect multiplication via nested inc loops, which cut the run time from ~20 minutes to fraction of a second. - Reusing the map module — again, visualizng the problem allowed to come up with an elegant solution
- Again some visualizations to help me spot edge cases
- Visualizing to recognize patterns — I calculated some of the results by hand and visualized them to uncover a more general pattern that allowed me to build a smart solution.
- Cinematic password decrypting animation
- Some first experiments with visualizations
- Optimized combinations calculator
- Folding the medicine molecule — this one was one of the first real challenges to find the smart solution. Some explorations there, but ultimately, no happy ending.