Skip to content

Commit 7909e77

Browse files
committed
feat: remove not needed logic at day 7
1 parent bb5cdc5 commit 7909e77

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/adventofcode/flashk/day07/Equation.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ private boolean hasSolution(long partialResult) {
3737
Integer currentOperator = operators.poll();
3838
boolean hasSolution = hasSolution(partialResult + currentOperator);
3939

40-
if(!hasSolution && partialResult != 0) {
40+
if(!hasSolution) {
4141
hasSolution = hasSolution(partialResult * currentOperator);
42-
} else if(partialResult == 0) {
43-
hasSolution = hasSolution(currentOperator);
4442
}
4543

4644
if(!hasSolution && concatenate) {

0 commit comments

Comments
 (0)