Last Minute Notes
Github
Docs
Learn
Search
⌘
K
@sayanstwt
Lessons
Learn
/
Data Structures & Algorithms
/
Arrays & Strings
Two Pointers
7 min
Beginner
8 steps
Walk inward from both ends of a sorted array in one pass.
target
6
sum
3
Pairs checked
1
up to n²/2
0
1
2
3
4
1
2
3
4
6
i
j
current
done
skipped
In this lesson
Step 1 of 8
1
The problem
2
Both ends
3
Two Sum
4
Container
5
Read/write
6
Partition
7
Sort first?
8
Recap