Class SolutionDay5

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

public class SolutionDay5 extends BaseSolution
  • Constructor Details

  • Method Details

    • partOne

      public Integer partOne(PuzzleInput input)
      Gets all the sorted updates, and then provides the sum of all middle numbers from each good update list
      Specified by:
      partOne in class BaseSolution
      Parameters:
      input - the PuzzleInput to be used for the solution
      Returns:
      the sum of middle numbers from the good updates
    • partTwo

      public Integer partTwo(PuzzleInput input)
      Finds all update lists that are not already sorted, then sorts them and sums up the middle number from each one.
      Specified by:
      partTwo in class BaseSolution
      Parameters:
      input - the PuzzleInput to be used for the solution
      Returns:
      the sum of all middle numbers from the sorted versions of each update list