Advent of code in Rust - solving year 2020 exercise 15 - Part 1 & Part 2 (Twitch Live 2021-07-12)

Subscribers:
953
Published on ● Video Link: https://www.youtube.com/watch?v=pGCaCAj9Ubo



Duration: 57:40
15 views
1


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




Other Videos By Luciano Mammino (loige)


2021-10-19Advent of code in Rust - solving year 2020 exercise 20 p1(Twitch Live 2021-10-18)
2021-10-12Advent of code in Rust - solving year 2020 exercise 19 p1 & p2 (ALMOST) (Twitch Live 2021-10-11)
2021-09-27Advent of code in Rust - solving year 2020 exercise 19 p1 (Twitch Live 2021-09-27)
2021-09-20Advent of code in Rust - solving year 2020 exercise 18 p2 (Twitch Live 2021-09-20)
2021-09-14Advent of code in Rust - solving year 2020 exercise 18 p1 (Twitch Live 2021-09-13)
2021-09-06Advent of code in Rust - solving year 2020 exercise 17 p2 (Twitch Live 2021-09-06)
2021-08-30Advent of code in Rust - solving year 2020 exercise 17 p1 (Twitch Live 2021-08-30)
2021-08-24Advent of code in Rust - reviewing year 2020 exercise 16 - Part 2 + 17 p1 (Twitch Live 2021-08-23)
2021-08-17Advent of code in Rust - solving year 2020 exercise 16 - Part 2 (Twitch Live 2021-08-16)
2021-08-10Advent of code in Rust - solving year 2020 exercise 16 - Part 1 (Twitch Live 2021-08-09)
2021-07-12Advent of code in Rust - solving year 2020 exercise 15 - Part 1 & Part 2 (Twitch Live 2021-07-12)
2021-07-05Advent of code in Rust - solving year 2020 exercise 14 - Part 2 (Twitch Live 2021-07-05)
2021-06-28Advent of code in Rust - solving year 2020 exercise 14 - Part 1 (Twitch Live 2021-06-28)
2021-06-27Working on Rust crate "gmaps-static" (Google Static Maps API URL builder) - Twitch live 2021-06-27
2021-06-21Advent of code in Rust - solving year 2020 exercise 13 - Part 2 (Twitch Live 2021-06-21)
2021-06-14Advent of code in Rust - solving year 2020 exercise 13 - Part 1 (Twitch Live 2021-06-14)
2021-06-07Advent of code in Rust - solving year 2020 exercise 12 - Part 2 (Twitch Live 2021-06-07)
2021-05-31Advent of code in Rust - solving year 2020 exercise 12 - Part 1 (Twitch Live 2021-05-31)
2021-05-24Advent of code in Rust - solving year 2020 exercise 11 - Part 2 (Twitch Live 2021-05-24)
2021-05-19Advent of code in Rust - solving year 2020 exercise 11 (Twitch Live 2021-05-18)
2020-04-26Middy.js contribution graph



Tags:
rust
rustlang
live coding
pair programming
advent of code
exercise 15 2020
learning
pairing
coding