Skip to main content

Two Pointers Quiz

Editorial

Eleven questions across the four Two Pointers lessons: which kind of two pointers a task needs, which pointer moves, how counting and duplicates work, and what a small bug returns. Pick an answer to see whether it's right and why. Nothing is saved, so you can take it again.

If one trips you up, its lesson is Introduction to Two Pointers, 3Sum, 4Sum and Counting Pairs with Two Pointers, Same-Direction Two Pointers: Changing an Array in Place or Two Pointers on Two Arrays or Strings.

Quiz

1 / 11

Multiple choice

Find two numbers in a sorted array that add up to a target. Which kind of two pointers fits?