Advent of code in Rust - solving year 2020 exercise 15 - Part 1 & Part 2 (Twitch Live 2021-07-12)
In this episode, we completed Advent of Code y2020 ex15 part 1 and part 2
This exercise is basically a simulation of a memory game where you need to build a sequence of numbers respecting a certain rules. Every turn you append a number to the list and you will stop after a certain number of turns.
The first and the second part only differ by the number of turns.
Part 2 runs 30 mln game turns so it's not the fastest (~24 secs in our machine). There might be some mathematical property that allows us to predict the final value without running the entire simulation, but we couldn't think of anything useful in this direction.
If you have found a smarter approach, let us know in the comments or open a PR in our repository!
For all the source code check out the official GitHub repo: https://github.com/lmammino/rust-advent
For seeing the next episodes live check out our Twitch channel: https://twitch.tv/loige