You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Solved by using the technique of "two pointers". Start with a pointer at the beginning and end of the array, then based on the average of the two values, we can adjust the pointers. If the average is too small, we move the left pointer up, and if the average is too big, we move the right pointer down, until we find a match or the pointers cross.