ADA MID SEM QUESTION BANK - Final
ADA MID SEM QUESTION BANK - Final
ADA MID SEM QUESTION BANK - Final
12. Explain how to find out Longest Common Subsequence of two strings using Dynamic
Programming method. Find any one Longest Common Subsequence of given two strings
using Dynamic Programming.
S1=abbacdcba S2=bcdbbcaac
13. What is Principle of Optimality? Explain its use in Dynamic Programming Method.
14. Give optimal substructure for make change problem. Given coins of denominations 1,3
and 4 with amount to be pay is 7. Find optimal no. of coins and sequence of coins used to
pay given amount using dynamic method.
15. Solve following knapsack problem using dynamic programming algorithm with given
capacity W=5, Weight and Value are as follows :
(2,12),(1,10),(3,20),(2,15).
Write an algorithm of knapsack problem using dynamic programming.
16. Given the four matrix find out optimal sequence for multiplication D=<5,4,6,2,7>.
17. Explain Binomial Coefficient algorithm using dynamic programming.
18. Differentiate between greedy method and dynamic programming.
19. Using dynamic programming find out the optimal sequence for the matrix chain
multiplication of A4x10, B10x3, C3x12, D12x20 and E20x7 matrices.
20. Give the characteristics of Greedy Algorithms. And Elements of Greedy Strategy.
21. Give and Explain the Prim’s Algorithm to find out Minimum Spanning Tree with
illustration.
22. Give and Explain the Kruskal’s Algorithm to find out Minimum Spanning Tree with
illustration.
23. Apply merge sort algorithm on array A = {2,7,3,5,1,9,4,8}. What is time complexity of
merge sort in worst case?
24. Explain the use of Divide and Conquer Technique for Binary Search Method. Give the
algorithm for Binary Search Method. What is the complexity of Binary Search Method?