Approach hintTry it first, then revealHide
Start with indices at both ends: if the sum is too small move the left index right, if too large move the right index left. O(n) time, constant extra space.
Start with indices at both ends: if the sum is too small move the left index right, if too large move the right index left. O(n) time, constant extra space.