Start with the empty binary search tree, and enter the first six capital characters through A to F. Show the resulting binary s

Question

1. (1) Start with the empty binary search tree, and enter the first six capital characters through A to F. Show the resulting binary search tree.

(2) Start with the empty heap tree, and enter the first six capital characters through A to F. Show the resulting heap tree.

(3) Give the postorder traversal for the above heap tree (2).

(4) Show the result of deleting the root node from the above binary search tree of (1).

(5) Show the result of deleting the root node from the above heap tree of (2).

 

 

2. There is a binary tree with seven nodes. The preorder and postorder traversal of the binary tree is given below. Draw the binary tree.

 

Preorder : G F D A B E C Postorder : A B D C E F G

 

 

 3. Show the B-tree after inserting the key ā€˜pā€™ into the following B-tree of order 5.

 

 

 

 

4. Using the Dijkstra algorithm, find the length of a shortest path from start vertex A to the remaining vertices in the following graph. You should show every step to get the optimal(shortest) path.

 

 

 

 

 

5. Using the Kruksal algorithm, find the minimum spanning tree for the following graph.

 

 

 


Details
Attachments
Purchase An Answer Below

Have a similar question?