Advent of code in Rust - solving year 2020 exercise 13 - Part 2 (Twitch Live 2021-06-21)
In this episode, we completed Advent of Code y2020 ex13 part 2 and started a small part of exercise 14 part 1.
We initially had a brute force solution for ex 13 part 2 but this solution was too slow to complete in any reasonable time. Roberto went off and used his brilliant mind to figure out a more optimized solution, while Luciano ended up doing some research on how other people solved it.
While Roberto coded his solution, Luciano discovered the Chinese Remainder Theorem (https://en.wikipedia.org/wiki/Chinese_remainder_theorem) and realised that Roberto just rediscovered the same theorem! :O
Chapeau to Roberto!
In this session we spent a little bit of time trying to figure out the difference between `let mut x = &y` and `let x = &mut y`. We are still a bit perplexed about this, so something worth researching a bit more. This seems like some good material: https://stackoverflow.com/a/29672875.
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