Assignment No. 04
SEMESTER Fall 2013
CS301- Data Structures
SEMESTER Fall 2013
CS301- Data Structures
Question
1(a):
Marks 2
Find the pre-order traversal of AVL tree given in solution of assignment 3.
Question 1(b): Marks 8
Construct min heap from data traversed in question 1(a).
Question
2(a):
Marks 2
Find the post-order traversal of AVL tree given in solution of assignment 3.
Question 2(b): Marks 8
Construct max heap from data traversed in question 2(a).
Question 3:
An AVL tree is given in the solution file of assignment 3. Convert that AVL tree into a threaded binary tree and also use dummy node in this threaded binary tree. Marks 5
Solution Guidelines:
Find the pre-order traversal of AVL tree given in solution of assignment 3.
Question 1(b): Marks 8
Construct min heap from data traversed in question 1(a).
Find the post-order traversal of AVL tree given in solution of assignment 3.
Question 2(b): Marks 8
Construct max heap from data traversed in question 2(a).
Question 3:
An AVL tree is given in the solution file of assignment 3. Convert that AVL tree into a threaded binary tree and also use dummy node in this threaded binary tree. Marks 5
- Use assignment 3 solution file for AVL tree while finding pre-order, post-order traversal or constructing threaded binary tree.
- In question 1(b) show final tree of min heap and status of array.
- In question 2(b) show final tree of max heap and status of array.
- While building max or min heap tree, read traversed values from left to right.