Class SolutionDay23
java.lang.Object
com.expedient.adventofcodejade.BaseSolution
com.expedient.adventofcodejade.solutions.year2024.SolutionDay23
-
Constructor Summary
ConstructorsConstructorDescriptionSolutionDay23(PuzzleInput input, PuzzleInput sampleInputOne, PuzzleInput sampleInputTwo) -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasThreeInCommon(Set<String> one, Set<String> two) partOne(PuzzleInput input) Logic for part one of the solution.partTwo(PuzzleInput input) Finds maximal clique starting from each computer in the list, saving the largest one encountered so far.Methods inherited from class com.expedient.adventofcodejade.BaseSolution
getInput, run
-
Constructor Details
-
SolutionDay23
-
-
Method Details
-
hasThreeInCommon
-
threeThatAreInCommon
-
partOne
Description copied from class:BaseSolutionLogic for part one of the solution. Must be overridden when implementing the solution.- Specified by:
partOnein classBaseSolution- Parameters:
input- the PuzzleInput to be used for the solution- Returns:
- output of this part of the solution
-
partTwo
Finds maximal clique starting from each computer in the list, saving the largest one encountered so far. Returns a string joining all PCs in the sorted largest clique- Specified by:
partTwoin classBaseSolution- Parameters:
input- the PuzzleInput to be used for the solution- Returns:
- joined string listing all PCs in the largest LAN party (alphabetical order)
-