Unformatted text preview: 1 is not full, so T 2 is full and height(T 2 )=height(T)-2=3-2=1, which T 2 has exactly 3 elements. Thus the last 3 elements of our inorder are the inorder of the full tree, the 4 th element from the right is the root of T, the elements on the left of the root of T are the inorder of T 2 which is a complete tree. Hence: Since T 1 is full then one may easy find out that ROOT(T 1 )= 4, LEFT(ROOT(T 1 ))=1, RIGHT(ROOT(T 1 ))=9. For T 2 we repeat the same reasoning as for T. Finally out three T is:...
View Full Document
- Spring '03
- French Revolution, Left-wing politics, Political spectrum, The Elements, leafs