~/problems
Problems
Basics first, then the classics, then company-style assessments. Every problem has tests you run right here; multi-level ones unlock as you go. See the roadmap.
Interview roadmap
Two pointers
Scan from both ends, or fast and slow.
14 problems
Interview roadmap
Two pointers Scan from both ends, or fast and slow.
- Basics: pair sum in a sorted list (pointers from both ends) basics py · c++ · java easy
- Photos with a nearby GPS fix py · c++ · java easy
- 3Sum py · c++ · java medium
- Container with Most Water py · c++ · java medium
- Count subarrays with a target sum (positive values) py · c++ · java easy
- Three positions with a target sum py · c++ · java medium
- Remove Duplicates from Sorted Array easy
- Sort Colors py · c++ · java medium
- Valid Palindrome py · c++ · java easy
- Two Sum II (Sorted Input) py · c++ · java easy
- Merge Sorted Array py · c++ · java easy
- Rotate Array py · c++ · java medium
- Boats to Save People py · c++ · java medium
- 4Sum py · c++ · java medium