← Two Pointers Quiz: all 8 questions
Two Pointers Quiz · Question 4 of 8
In Container With Most Water, which pointer should move?
In Container With Most Water, which pointer should move?
- A.Always the left one
- B.The taller line
- C.The shorter line
- D.Both, alternately
Answer & explanation
Correct answer: The shorter line
The area is limited by the shorter line. Moving the taller one can only shrink the width without raising that limit.
Can you get the rest right without peeking?
Take the timed Two Pointers Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →