Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ✅ Pattern 02: Two Pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ function searchPair(arr, targetSum, first, triplets){
//since arr[end] >= arr[start], therefore, we can replace arr[end]
//by any number between start and end to get a sum less than the targetSum
for(let i = end; i > start; i--){
triplets.push(arr[first], arr[start], arr[end])
triplets.push(arr[first], arr[start], arr[i])
}
start++
} else {
Expand Down