Ezvor

1902. Depth of BST Given Insertion Order

MediumArray Preparing judge… LeetCode
ArrayTreeBinary Search TreeBinary TreeOrdered Set

Hints

Hint 1
There are at most 2 possible places where a new node can be inserted?
Hint 2
How can we keep track of the depth of each node?