Skip to main content

Two Pointers

Use two indices moving toward each other or in the same direction to solve linear problems.

13 problems 5 Easy 7 Medium 1 Hard

Problems (13)

Problem Link
Two Sum II - Input Array Is Sorted
3Sum
Container With Most Water
Trapping Rain Water
Valid Palindrome
Move Zeroes
Remove Duplicates from Sorted Array
4Sum
Sort Colors
Squares of a Sorted Array
Boats to Save People
Valid Palindrome II
Minimum Length of String After Deleting Similar Ends

Related Guide

Two Pointers: The Complete Guide →

Converging, same-direction, fast & slow — the two-pointer family is bigger than most engineers reali…

Enjoying this free content?

If this saved you time, buying me a coffee keeps new content coming.

Buy me a coffee
Buy me a coffee