QUESTION BANK
QUESTION BANK
Sort Question
1. Define the meaning of asymptotically tight upper bound? [CO-1][PO-1]
2. Is the running time of merge sort depends on the value of keys in input file? Explain [CO-2][PO-
2]
3. Find the growth order of n, log n, 1, n log n, 2 n , n 3 ,n 2 in increasing sequence.
[CO-2][PO-3]
4. When best case and worst case partitioning will occur in quick sort? [CO-2][PO-2]
n
5. Prove that n!=o(n ). [CO-1][PO-3]
6. Consider the recurrence T(n)=T(n-1)+1 and T(1)=1. Find its time complexity [CO-1][PO-3]
7. What are the characteristics of an algorithm? [CO-1][PO-1]
8. Define Worst case, Average case and Best case efficiency of an algorithm. [CO-1][PO-1]
9. Differentiate between priori & posteriori analysis of an Algorithm. [CO-1] [PO-2]
10. Arrange the following functions from the lowest asymptotic order to the highest. 2 n, 10n, n log
n, 4n3, log n, 5n2. [CO-2][PO-1]
11. What are the best case and worst case time complexity of Linear Search? [CO-2][PO-2]
12. What are the different ways of measuring the running time of an algorithm? [CO-1][PO-2]
13. Find the O-Notation for the following function f(n) = 27n2 + 16n + 25 [CO-2][PO-3]
14. State the different phases of an algorithm. [CO-1][PO-1]
15. Define asymptotically tightly bound notation. [CO-1][PO-2]
16. Draw the Venn diagram to establish the relationship between the different asymptotic notations
of an algorithm. [CO-4][PO-2]
17. What are the different ways of measuring the running time of an algorithm? [CO-1][PO-1]
18. Draw the Venn diagram to establish the relationship between the different asymptotic notations
of an algorithm. [CO-1][PO-2]
19. Define Worst case, Average case and Best case efficiency of an algorithm. [CO-1][PO-1]
20. What are the best case and worst case time complexity of Linear Search? [CO-1][PO-2]
21. Differentiate between Big-Oh and Big-Omega notation [CO-1][PO-1]
22. Define and Differentiate between time and space complexity. [CO-1][PO-1]
23. What is mean by growth between function [CO-1][PO-1]
24. n!=o(nn) True or false [CO-1][PO-2]
25. Prove that n!=o(2n) using limit theorem [CO-1][PO-2]
26. Write the Recurrence relation for binary search and solve it [CO-1][PO-2]
27. Is all the problem has recurrence relation. Explain [CO-1][PO-2]
Long Question:
Module-II
Short Question
1. What is the time complexity for binary search [CO-2][PO-2]
2. What is heap. How max heap is different from min heap. [CO-2][PO-1]
3. Write the recurrence relation for binary search [CO-2][PO-2]
4. What is the use of partition in quick sort? [CO-2][PO-2]
5. Write the recurrence relation for quick sort [CO-2][PO-3]
6. What is the best case time complexity for quick sort [CO-2][PO-2]
7. Where the partition will occurs in quick sort if array elements are same [CO-2][PO-2]
8. Where the partition will occurs in quick sort if array elements are increasing order
[CO-2][PO-4]
9. Where the partition will occurs in quick sort if array elements are decreasing order
[CO-2][PO-4]
10. Define heap and heap size. [CO-2][PO-1]
11. Difference between max heap and min heap [CO-2][PO-1]
Long Question:
9. Find the order of multiplication for matrix whose dimension is given as A={ 10,20,15,10,5} which
can evaluate in minimum time [CO-2][ PO-3]
10. Define LCS. Write down the algorithm for computing the length of an LCS. Find the LCS from the
given sequences X={A,B,C,B,D,A,B} and Y={B,D,C,A,B,A} [CO-2][ PO-3]
11. Define Assembly-line scheduling. Write down the algorithms and analysis the Time complexity
[CO-2]
[PO-3]
12. What is the optimal Huffman code for the following set of frequencies based on the first eight
Fibonacci numbers a:1 b:1,c:2,d:3,e:5,f:8,g:13,h:21 [CO-2][PO-3]
13. Define Assembly-line scheduling. Write down the algorithms and analysis the Time complexity
[CO-2]
[PO-3]
14. Which problem can be applied in dynamic programming approch? Discuss any one. [CO-2]
[PO-4]
Module-III
Short Question
1. What is the job of disjoint data structure? [CO-3][PO-2]
2. Mention different operation on disjoint data structure with time complexity. [CO-3][PO-1]
3. White the algorithm to find connected component. [CO-3][PO-3]
4. How you can identify two node in the same component in disjoint data structure [CO-3]
[PO-2]
5. What is the time complexity for union in disjoint data structure? [Co-3][Po-2]
6. Mention different operation in disjoint forest. [CO-3][PO-1]
7. What is weight in graph algorithms? [CO-3][PO-1]
8. How DFS is different from DFS. [CO-3][PO-2]
9. Define minimum spanning tree. [CO-3][PO-1]
10. What is time complexity of kruskal and prims algorithms. [CO-3][PO-2]
11. What is negative weigh cycle? [CO-3][PO-1]
12. Define single source shortest path. [CO-3][PO-1]
13. What do you mean by initialization of single source shortest path? [CO-3][PO-3]
14. Write the pseudo code for relax for an edge. [CO-3][PO-3]
15. How Bellman fords algorithms is different from Dijkstra algorithms. [CO-3][PO-2]
16. How do you understand the all pair shortest path. [CO-3][PO-2]
17. The minimum number of comparisons required finding the minimum and the maximum of
100 numbers is _________________. [CO-2][PO-2]
Long Question
18. Write down Kruskal’s and Prim’s algorithm and also specify the running time of both
algorithms [CO-3] [PO-3]
19. Find the BFS of the following graph by considering u as the start node. [CO-3][PO-3]
20. Explain Prim’s algorithm and its complexities. Analyze it with an example. [CO-3][PO-2]
21. Find the DFS of the following graph by considering u as the start node [CO-3][PO-2]
22. Briefly describe working mechanism Dijkstra algorithms with suitable example. [CO-3][PO-3]
23. Briefly describe Bellman Ford algorithms with suitable example. [CO-3][PO-3]
24. Explain all pair shortest path algorithms. Evaluate the time complexity. [CO-3][PO-3]
Module: IV
Short question:
Long Question
17. Write the approximation algorithm for travelling salesman problem [CO-4][PO-3]
18. Explain how back tracking can be applied to N-Queen problem. [CO-4][PO-4]
19. Suppose we use two string matching problems, consisting of a text T and a string P Problem 1 is
as follows: T = aaabaadaabaaa P = aabaaa Apply the Knuth–Morris–Pratt pattern matching
algorithm to the first pattern [CO-4][PO-3]
20. Suppose we use two string matching problems, consisting of a text T and a string P , is as
follows: T = 9875623 P = 75 and q=7 find the position using Rabin Karp algorithms
[CO-4][PO-3]
21. What is Approximation algorithms and why we need it? Is it polynomial computable
[CO-4][PO-4]
22. Define P, NP, NP hard, and NP complete. Construct relational diagram among them.
[CO-4][PO-4]
23. Describe branch and bound technique for 8- queen problem. . Is it polynomial computable.
[CO-4][PO-4]
24. Describe branch and bound technique for Subset sum problem. . Is it polynomial computable.
[CO-4][PO-4]
25. Describe Back tracking technique for 8- queen problem. Is it polynomial computable.
[CO-4][PO-3]
26. Describe Back tracking technique for Subset sum problem. Is it polynomial computable. [CO-4]
[PO-3]
27. Suppose we use two string matching problems, consisting of a text T and a string P , is as
follows: T = 9875623 P = 75 and q=7 find the position using Rabin Karp algorithms. [CO-4][PO-3]
28. Give the failure function (or prefix function) of the Knuth–Morris– Pratt pattern matching
algorithm for the pattern P from the first pattern matching problem [CO-4][PO-3]