Expand description

This is my solution for Advent of Code - Day 8 - Treetop Tree House

Identify the best tree in a grid to build a tree house in, it must be hidden and have a good view.

Functions

  • For a given tree, count how many trees can be seen in a given direction
  • For each tree in the grid, multiply the trees they can see in each direction. Return the best score.
  • Count the trees visible from the edges of the grid.
  • For a given row or column start or end step forwards or backwards marking those that can be seen from the starting position
  • The entry point for running the solutions with the ‘real’ puzzle input.
  • with_delta 🔒
    Apply a multiple of a delta to a starting position to get the position for a step if it is positive