diff --git a/src/main/java/com/adventofcode/flashk/day07/Equation.java b/src/main/java/com/adventofcode/flashk/day07/Equation.java index bbb3a6c..e443c52 100644 --- a/src/main/java/com/adventofcode/flashk/day07/Equation.java +++ b/src/main/java/com/adventofcode/flashk/day07/Equation.java @@ -37,10 +37,8 @@ private boolean hasSolution(long partialResult) { Integer currentOperator = operators.poll(); boolean hasSolution = hasSolution(partialResult + currentOperator); - if(!hasSolution && partialResult != 0) { + if(!hasSolution) { hasSolution = hasSolution(partialResult * currentOperator); - } else if(partialResult == 0) { - hasSolution = hasSolution(currentOperator); } if(!hasSolution && concatenate) {