Skip to content

Commit

Permalink
feat: minor adjustments to day 19
Browse files Browse the repository at this point in the history
  • Loading branch information
Flashky committed Dec 19, 2024
1 parent e774405 commit bd032bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/adventofcode/flashk/day19/LinenLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

public class LinenLayout {

private List<String> patterns;
private List<String> designs;
private final List<String> patterns;
private final List<String> designs;

private Map<String,Boolean> memo = new HashMap<>();
private final Map<String,Boolean> memo = new HashMap<>();

public LinenLayout(List<String> inputs) {
patterns = Arrays.stream(inputs.getFirst().replace(StringUtils.SPACE, StringUtils.EMPTY).split(","))
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/adventofcode/flashk/day19/LinenLayout2.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

public class LinenLayout2 {

private List<String> patterns;
private List<String> designs;
private final List<String> patterns;
private final List<String> designs;

private Map<MemoState,Long> memo = new HashMap<>();
private final Map<MemoState,Long> memo = new HashMap<>();

public LinenLayout2(List<String> inputs) {
patterns = Arrays.stream(inputs.getFirst().replace(StringUtils.SPACE, StringUtils.EMPTY).split(","))
Expand All @@ -27,7 +27,6 @@ public long solveB() {
long result = 0;
for(String design : designs) {
result += count(design, StringUtils.EMPTY);
memo.clear();
}
return result;
}
Expand Down
1 change: 0 additions & 1 deletion src/test/java/com/adventofcode/flashk/day19/Day19Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

@DisplayName(TestDisplayName.DAY_19)
@TestMethodOrder(OrderAnnotation.class)
@Disabled // TODO Remove comment when implemented
public class Day19Test extends PuzzleTest {

private static final String INPUT_FOLDER = TestFolder.DAY_19;
Expand Down

0 comments on commit bd032bb

Please sign in to comment.