Skip to content

michel-kraemer/adventofcode-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Advent of Code

These are my solutions to the annual Advent of Code challenge.

Goals

๐Ÿฆ€ Implement everything in Rust

๐Ÿ‘ Find generalized solutions that work with every input

โ›“๏ธโ€๐Ÿ’ฅ Avoid 3rd party dependencies (if possible and reasonable)

๐Ÿƒโ€โ™‚๏ธโ€โžก๏ธ Try to optimize performance (to the best of my knowledge)

๐Ÿค“ Find clever solutions to complex problems that others might not have found. Some highlights I'm particularly proud of:

  • Day 25 of 2018: Combining DBSCAN with a spatial index based on Morton indices. Very fast!
  • Day 21 of 2023: Applying bit operations to simulate the cellular automaton, which allowed me to implement a fast and generalized solution that should work on any input.
  • Day 25 of 2023: Using Brandes' algorithm to quickly calculate the betweenness centrality of graph nodes.
  • Day 10 of 2025: While most people approached this problem using a solver (such as S3 or good_lp), I found a solution that works completely without a 3rd party dependency. I implemented a DFS in which I use heuristics to prune as many branches as possible. This is definitely not the fastest approach possible, but it gets the job done in reasonable time and is certainly quite unique. See my Reddit comment for more information.

License

The solutions are released under the MIT license. See the LICENSE file for more information.