Rust challenge 31/100 - advent of code 2021 day 1 part 1 & 2
Table of content
What is this
The rules of the game are explained in my original post.
31st Challenge
Challenge
Today I’m solving today’s AoC day 1 2021. It took me longer than it I would have liked.
I wanted to do it quickly with a filter
or fold
function, which didn’t work. I ran out of time and had to leave for work .
Solution
I peaked at the python solution on which used the zip
function I had not come across before. Basically
it makes a tuple out of two iterators. Using this as well as multizip
I was able to implement the functions.
To see the full source see github and see the live demo in playground.