Skip to content

Commit

Permalink
Not relevant, but optimize multi case
Browse files Browse the repository at this point in the history
  • Loading branch information
tjpalmer committed Apr 12, 2021
1 parent adb1f4a commit b08971a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 2020/java/Day1b.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public static void main(String[] args) throws Exception {
.range(j + 1, numbers.length)
.map(k -> numbers[k])
.filter(c -> a + b + c == 2020)
.findAny()
.stream()
.mapToObj(c -> new int[]{a, b, c})
.findAny()
.orElse(null);
Expand Down

0 comments on commit b08971a

Please sign in to comment.