Class SolutionDay8

java.lang.Object
com.expedient.adventofcodejade.BaseSolution
com.expedient.adventofcodejade.solutions.year2024.SolutionDay8

public class SolutionDay8 extends BaseSolution
  • Constructor Details

  • Method Details

    • getAntennaLists

      public static Map<Character,List<Coordinate>> getAntennaLists(Grid<Character> grid)
      Finds each type of antenna on the given input Grid, as well as the Coordinate for each antenna of each kind
      Parameters:
      grid - the input Grid
      Returns:
      Map of Lists of Coordinate per Character antenna type
    • getAntiNodeCount

      public long getAntiNodeCount(Grid<Character> grid, Map<Character,List<Coordinate>> antennaLists, boolean partTwo)
      Finds the anti-nodes in the grid using the given antenna lists, and then provides the count
      Parameters:
      grid - the input Grid
      antennaLists - lists of antennas per Character antenna type
      partTwo - whether this is part two
      Returns:
      the count of anti-nodes
    • partOne

      public Long partOne(PuzzleInput input)
      Description copied from class: BaseSolution
      Logic for part one of the solution. Must be overridden when implementing the solution.
      Specified by:
      partOne in class BaseSolution
      Parameters:
      input - the PuzzleInput to be used for the solution
      Returns:
      output of this part of the solution
    • partTwo

      public Long partTwo(PuzzleInput input)
      Description copied from class: BaseSolution
      Logic for part two of the solution. Must be overridden when implementing the solution.
      Specified by:
      partTwo in class BaseSolution
      Parameters:
      input - the PuzzleInput to be used for the solution
      Returns:
      output of this part of the solution