Solutions for Advent of Code in Rust.
Using the wonderful project template from here: https://github.com/fspoettel/advent-of-code-rust
- Spent quite a while figuring out how to iterate over each elf separately as a chunk.
- Later realized I could have split it into chunks with
\n\n
before parsing the input as lines.
- Went with simple match statements for the RPS logic.
- Quite happy with how the input iterating and parsing turned out.
- Had a bit of a brain fart at one point and lost like 10 mins >_<
- Spent most of the time figuring out HashSet intersections.
- This task took some fiddling to satisfy the borrow checker.
- Was fun to fiddle with iterators to find a clean solution.
- I'm on the fence about whether I should go full tryhard without caring about the quality of my solution.
- Today's inputs were super annoying to parse :c
- Simple as can be with the windows iterator :)
- I couldn't come up with any clever tricks, so I went ahead and parsed the whole file system into a proper tree.
- It was my first time making a tree in rust. It was hard, as expected :p
- Today I had to completely rewrite my solution for part 2
- Today's task was fun! Cool to see rope-like behaviour from such a simple system.
- Quite happy with the abstractions I came up with for today :)
- Another great task! Really enjoyed finding the output for part 2 :D
- Took some fiddling to get the generics right, but it works nicely in the end.
- Had to look for a hint for part 2 today. Turns out I was really close even before that, but I just didn't make the final connection.
- Did some really dumb mistakes in part 2, mostly related to integer overflow.
- Got distracted for like 2 hours in the middle of part 1.
- I guess this is the obligatory Dijkstra day :D
- I really like the solution I came up with today! Felt like I'm using Rust to it's fullest :D
- Got distracted a lot during part 1, so it's way longer than it should be.
- Used the
nom
parser crate today, and it worked out great! I'm definitely a fan now c:
- Today was quite tough. Worked on it throughout the day.
- Part 2 had a 1-hour runtime at the beginning, but now it's down to 36ms :D
- Was getting tired, so I slept on today's problem.
- Definitely the toughest task til now. I haven't used DP much, so this was a good way to learn more.