Given the sorted array arr = [1, 3, 4, 5, 6, 8]
, if the goal is to find two numbers whose sum is greater than 10
, at which positions will the two pointers be when the condition is met?
left = 0
, right = 4
left = 0
, right = 5
left = 1
, right = 5
left = 2
, right = 3
This question is part of this quiz :
Quiz on Two Pointer Technique for DSA