loading...

CS301 Data Structures Assignment 5 Solution Fall 2012

Question No. 1 (10 marks)

Consider the following AVL tree,

(a). Delete the node containing ‘76’ and draw the balanced AVL tree after deletion.  (5 marks).

(b). Delete the root node from the tree drawn in part (a) and show the balanced AVL tree after deletion.  (5 marks)

Note: In both parts, you are required to show only the resultant AVL tree after deletion .

 

Question No. 2:

Build an expression tree from the following postfix expression. (10 marks)

ab+cd+/ef+g+hi+/+

Solution:




DOWNLOAD SOLUTION HERE
loading...