diff --git "a/\342\234\205 Pattern 02: Two Pointers.md" "b/\342\234\205 Pattern 02: Two Pointers.md" index e77d013..d4dc0f0 100644 --- "a/\342\234\205 Pattern 02: Two Pointers.md" +++ "b/\342\234\205 Pattern 02: Two Pointers.md" @@ -569,7 +569,7 @@ function searchPairs(arr, targetSum, first, second, quads) { //skip the same element to avoid duplicate quadruplets start++ } - while(start < end && arr[end] === arr[end -1]){ + while(start < end && arr[end] === arr[end +1]){ //skip the same element to avoid duplicate quadruplets end-- }