[prev] 21 [next]

Splay Trees (cont)

Cases for splay tree double-rotations:
  • case 1: grandchild is left-child of left-child   ⇒ double right rotation from top
  • case 2: grandchild is right-child of left-child
  • case 3: grandchild is left-child of right-child
  • case 4: grandchild is right-child of right-child   ⇒ double left rotation from top

[Diagram:Pic/splay-cases.png]