A dump of solutions for Advent of Code 2021, in Rust.
These are all pretty quick and dirty, and certainly shouldn't be relied upon as an example of good code. These are largely the first working solutions that came to mind.
The goal is only to practice Rust and pick up a few tricks, while attempting to solve the puzzles as quickly as possible.
These will be uploaded soon after completion, which will be nowhere near to getting on the leaderboard. I may take some time over the holidays to revise some solutions if and when I figure out nice ways to clean them up.
The rules I have set myself (and may break at any time) are:
- The program output does not need to be the complete answer (it may require manual post-processing)
- The program input does not need to be unmodified from the provided input (it may be manually pre-processed)
- Use only the Rust standard library (no external crates) except itertools (see next...)
- Use as many iterators and iterator functions as possible
- Only add functions to lib.rs during the completion of a puzzle (no prep-work) or tidying up existing puzzles
- The first commit for each day will be representative of a first-cut. A little clean-up and running clippy is allowed to protect my reputation, but no refactoring once the clock stops