diff --git a/solutions/02.ts b/solutions/02.ts index e7c60a8..9c8a40e 100644 --- a/solutions/02.ts +++ b/solutions/02.ts @@ -22,7 +22,8 @@ class DayTwo implements Solvable { gradients.push("ascending") } else if (levels[i] > levels[j]) { gradients.push("descending") - } i++ + } + i++ j++ } // is safe and constant gradient?