![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
rotateRight( Gr, Par, Ch){
if(Par != root)
Gr becomes parent of Ch
right subtree of Ch becomes left subtree of Par
Ch acquires Par as its right subtree
}
![]() |
rotateLeft( Gr, Par, Ch){
if(Par != root)
Gr becomes parent of Ch
left subtree of Ch becomes right subtree of Par
Ch acquires Par as its left subtree
}
![]() |
![]() |