http://www.geeksforgeeks.org/archives/17235
Please explain me by drawing tree...as i am not able to get this right....
suppose we have 12,2,3,0,11,1
so first
start from ryt
1[0] // 1 is root...count is 0
\
11[1] // left subtree is 0 and 0+1=1
now 0
insert on left
1[0] // 1 is root...count is 0
/ \
0[0] 11[1] // left subtree is 0 and 0+1=1
now 3
1[0]
/ \
0[0] 11[1]
/
3[2]// left sub tree is 1..+1=2
1[0]
/ \
0[0] 11[1]
/
3[2]// left sub tree is 1..+1=2
/
2[2]
now please tell me what happens next...i am clear with AVL rotation..plz
explain when we reach 12 how itz count containg5
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.