Advent of Code 2020 - Day 3
Now we need to check for trees in paths. The interesting bit is that the path can grow ad infinitum to the right. Check the details at https://adventofcode.com/2020/day/3 If you want to follow along please download AdventOfCode2020.pbit and check Day 1 post for instructions. Part 1 How do we avoid repeating the pattern? Looking at the provided sample we have: ..##....... #...#...#.. .#....#..#. ..#.#...#.# .#...##..#. ..#.##..... .#.#.#....# .#........# #.##...#... #...##....# .#..#...#.# The interesting part begins after line 3, where we are going to need to get positions that are over the length of the row. The value that we wish for row 4 is 1, which is the value of the remainder of dividing 12 by the lenth of the track which is 11. Adding a new column with the remainder we can crosscheck with our data and everything seems to work: ...