Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to insert a new node on AVL tree using double rotation?
#1
When we insert a new node into an AVL tree, there are four possible cases:
Case I: If new node is inserted in the left subtree of the left child of a, perform single right rotation.
Case II: If new node is inserted in the right subtree of the left child of a. perform left-right double rotation.
Case III: If new node is inserted in the left subtree of the right child of a. perform right-left double rotation.
Case IV: If new node is inserted in the right subtree of the right child of a, perform single left rotation



[Image: AVL-rotation.JPG]

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What is difference among Binary Tree, Complete Binary Tree and Binary Search Tree? Vuhelper 2 4,342 03-18-2012, 12:47 AM
Last Post: Xpert
  Threaded Binary Tree? in C++ 2012 Vuhelper 0 3,473 01-06-2012, 12:25 AM
Last Post: Vuhelper
  what is the existing node and root node Vuhelper 0 2,142 01-04-2012, 11:09 PM
Last Post: Vuhelper
  how stack operation proves costly during traversing a tree Vuhelper 0 1,518 01-04-2012, 10:43 PM
Last Post: Vuhelper
  why huffman tree is not an AVL tree not how? Vuhelper 0 2,040 01-04-2012, 10:39 PM
Last Post: Vuhelper
  what is the difference between 1. Double Right-Left Rotation 2. Double Left-Right Rot Vuhelper 0 2,019 01-04-2012, 10:37 PM
Last Post: Vuhelper
  why Hoffman tree is not an AVL Tree? Vuhelper 0 2,123 01-04-2012, 10:33 PM
Last Post: Vuhelper
  AVL tree, It must satisfie the 2 conditions. Vuhelper 0 811 01-04-2012, 10:32 PM
Last Post: Vuhelper
  the method of balancing an anl tree? Vuhelper 0 2,983 01-04-2012, 10:30 PM
Last Post: Vuhelper
  we will apply single rotation and which will apply double rotation?2012 Vuhelper 0 1,939 01-04-2012, 10:29 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)