2 posts tagged with "Programming"

  • 09 Dec 2023/ Programming

    Implementing Interval Splitting for Advent of Code

    I originally didn't want to write _another_ blog post about Advent of Code, especially not consecutive ones. However, the solution to the second part of the fifth day was so interesting that I couldn't resist. The puzzle is about mapping intervals to one another. I just want to note that this puzzle took my sanity. Never have I had more off-by-one errors or why the fuck doesn't this work?'' moments. So let's get started, shall we? The puzzle To understand the puzzle, let's have a look at the e

  • 04 Dec 2023/ Programming

    How my algorithm accidentally became O(n!)

    Advent of Code is a yearly event where you solve a series of programming puzzles. The puzzles are released daily and you can solve them in any language you like. I like to do them (until I give up after a few days), and this year is no different. This year's day four puzzle was interesting, and - that's why I'm writing this blogpost - it becomes a good example of how sometimes your algorithms perform significantly worse than you expect them to. The puzzle Let's first look at the puzzle. Effec

All tags