3Sum
3Sum is a canonical two-pointer problem that appears frequently at Apple. It tests whether you can reduce O(n³) brute force to O(n²) by sorting first and using the two-pointer technique — a pattern that extends to 4Sum, kSum, and many array problems.
Enable JavaScript for the full StreamPrep guide.