📌 Interview Questions on Two Pointer Technique
- Find if there exist two numbers in a sorted array that sum up to a given target.
- Remove duplicates from a sorted array in-place and return the new length.
- Return a new array of squares from a sorted array, sorted in non-decreasing order.
- Find all unique triplets in an array that sum up to zero (3-Sum Problem).
- Sort an array containing only 0s, 1s, and 2s (Dutch National Flag Problem).
- Check if a given string is a palindrome using two pointers.
- Find the maximum water trapped between two vertical lines (Container With Most Water problem).
- Merge two sorted arrays into one sorted array in-place using two pointers.
- Find the intersection of two sorted arrays using the two pointer technique.
- Check if there exists a pair in a rotated sorted array that sums to a given target.
Shaivi Connect © 2025