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 difference is that everything to the left of the root node is smaller than it and everything to its right is bigger.
4
+
5
+
Searching this tree if it is pretty balanced then is O(log(n)), because it depends on the height of the tree (which in a previous calculation was shown to be log(n)).
6
+
7
+
In the worst case, where it is completely unbalanced, it is basically like a line and it would be linear O(n) time.
8
+
9
+
10
+
11
+
I'm kind of curious on how shuffling the tree around works if I make inserts that require that reshuffling. The quiz where the implementation was done did not address this.
0 commit comments