Question DSA-TP-0006
EasyWhat is the time complexity of finding a pair with a given sum in a sorted array using two pointers?
- A.
O(n)
- B.
O(log n)
- C.
Show answer and explanation
Answer: A
Each step moves one pointer inward, so there are at most n steps.