Unit 4&5 QAB UPDATED
Unit 4&5 QAB UPDATED
Unit 4&5 QAB UPDATED
17.The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the
same tree is 8,6,9,4,7,2,5,1,3. The height of a tree is the length of the longest path from
the root to any leaf. What is the height of the binary tree?
18.Define a B tree. Construct a B tree of order 3 by inserting following keys in the order
shown into an empty B tree. ZQABPYXTGDJ.
Unit 5
1. Discuss Stassen’s algorithm for matrix multiplication.
2. Explain the disadvantage of Bellman Ford Algorithm with example.
3. Explain the concept of Divide & Conquer.
4. Perform merge sort on the following data items stored in single dimensional array:
{10, 5, 9, 8, 7,3, 4, 0, 2, 1}. Also discuss its time complexity.
5. Discuss the concept of Greedy programming.
12. Explain the basic architecture of Dijkstra’s algorithm along with an example?
13. Write the algorithm of Bellman Ford to find the shortest path. Explain with example.
14. Discuss Longest Common Subsequence(LCS) problem solution by using Dynamic
programming.
15. What will be the longest common subsequence's length of P and Q?
16. Explain Minimum Spanning Tree? Draw MST of following graph by applying
Kruskal’s algorithm & prim’s Algorithm. What is number of distinct minimum
spanning trees for the weighted graph below? Explain.
17. For the given graph(weighted, directed) apply Floyd-Warshall algorithm for
constructing shortest path.
19. Describe the Prim’s algorithm to find the cost of Minimum Spanning Tree using
Prim’s Algorithm.
20. What is spanning tree. Find the minimum cost of the following tree and draw its
spanning tree.