Tree Rotation
This is important to understand, as it is how we rebalance trees. Needed for example in AVL Tree, as seen in CS240.
https://en.wikipedia.org/wiki/Tree_rotation
Here are the different rotations that one can do:
This is important to understand, as it is how we rebalance trees. Needed for example in AVL Tree, as seen in CS240.
https://en.wikipedia.org/wiki/Tree_rotation
Here are the different rotations that one can do: