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
The current code would fail when remove the root element in a tree where right subtree only have right child.
# 17
# 0 20
# -5 5 25
Current code would produce a result with duplicate elements
# 20
# 0 20
# -5 5 25
Trick is to move one the assignment to root value to the bottom
0 commit comments