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
Copy file name to clipboardExpand all lines: AVL Tree/README.markdown
+1-5Lines changed: 1 addition & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,7 @@ Most of the code in [AVLTree.swift](AVLTree.swift) is just regular [binary searc
56
56
57
57
> **Note:** If you're a bit fuzzy on the regular operations of a binary search tree, I suggest you [catch up on those first](../Binary Search Tree/). It will make the rest of the AVL tree easier to understand.
58
58
59
-
The interesting bits are in the following methods:
60
-
61
-
-`updateBalance()`. Called after inserting a new node. This may cause the node's parent to be rebalanced.
62
-
-`rebalance()`. Figures out how to rotate the nodes to restore the balance.
63
-
-`rotateRight()` and `rotateLeft()` perform the actual rotations.
59
+
The interesting bits are in the `balance()` method which is called after inserting or deleting a node.
0 commit comments