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
Time Complexity: O(n/2) where n = length of height. This is because we're using pointers that will eventually meet at the midpoint (best case scenario).
Space Complexity: O(1) because no dynamic data structure was created.