We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb5cdc5 commit 7909e77Copy full SHA for 7909e77
src/main/java/com/adventofcode/flashk/day07/Equation.java
@@ -37,10 +37,8 @@ private boolean hasSolution(long partialResult) {
37
Integer currentOperator = operators.poll();
38
boolean hasSolution = hasSolution(partialResult + currentOperator);
39
40
- if(!hasSolution && partialResult != 0) {
+ if(!hasSolution) {
41
hasSolution = hasSolution(partialResult * currentOperator);
42
- } else if(partialResult == 0) {
43
- hasSolution = hasSolution(currentOperator);
44
}
45
46
if(!hasSolution && concatenate) {
0 commit comments