Question DSA-TP-0013
MediumWhy does the two-pointer pair-sum method need the array to be sorted?
- A.
Sorting removes duplicates
- B.
Moving a pointer must predictably increase or decrease the sum
- C.
Sign up free to see the answer and a step-by-step explanation.