Update avl_tree.md
This commit is contained in:
parent
d625eacc18
commit
52042ccec2
@ -293,13 +293,13 @@ It can be observed that **the right and left rotation operations are logically s
|
|||||||
|
|
||||||
For the unbalanced node 3 shown in the figure below, using either left or right rotation alone cannot restore balance to the subtree. In this case, a "left rotation" needs to be performed on `child` first, followed by a "right rotation" on `node`.
|
For the unbalanced node 3 shown in the figure below, using either left or right rotation alone cannot restore balance to the subtree. In this case, a "left rotation" needs to be performed on `child` first, followed by a "right rotation" on `node`.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Right-left rotation
|
### Right-left rotation
|
||||||
|
|
||||||
As shown in the figure below, for the mirror case of the above unbalanced binary tree, a "right rotation" needs to be performed on `child` first, followed by a "left rotation" on `node`.
|
As shown in the figure below, for the mirror case of the above unbalanced binary tree, a "right rotation" needs to be performed on `child` first, followed by a "left rotation" on `node`.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Choice of rotation
|
### Choice of rotation
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user