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
We add a lower and higher bound that every node must respect. When we go left, we reduce our higher bound so that every node to the left must be smaller. When we go right, we augment our lower bound so that every node to the right must be larger.
O(n) Time
O(log n) Space, because a new stack frame is added each recursive call equal to the height of the tree.