Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Flashky committed Dec 6, 2024
2 parents b06cbb3 + 4e190a9 commit 81788a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/adventofcode/flashk/day05/Update.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import lombok.Getter;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
Expand All @@ -28,7 +29,7 @@ public boolean isOrderedBy(Map<Integer, Set<Integer>> orderingRules) {
int i = 0;
while(isOrdered && i < pages.size()) {
int page = pages.get(i);
isOrdered = isOrdered(i, orderingRules.getOrDefault(page, new HashSet<>()));
isOrdered = isOrdered(i, orderingRules.getOrDefault(page, Collections.emptySet()));
i++;
}

Expand Down

0 comments on commit 81788a3

Please sign in to comment.