Let's go through the second week of Advent of Code in Rust.
We get a forest and we want to know how many trees are visible from the outside. Apart from that we want to find the best view.
Nothing interesting. We are moving around 2D map though. And indexing can get a
bit painful when doing so, let's refactor it a bit ;) During the preparation for
the AoC, I have written
Vector2D and now it's time to extend it with indexing
Vecs. In my solution I was manipulating with indices in the following
- swapping them
- checking whether they are correct indices for the
I'm getting familiar with Rust and starting to “abuse” it… While doing so, I'm also uncovering some “features” that I don't really like. Therefore I will mark all of my rants with thicc