DAA- MCQ
DAA- MCQ
] a) Ω b) θ c) O d) ω
3. The running time of the following sorting algorithm depends on whether the partitioning
balanced or unbalanced.
a) key < a[mid] b) key > a[mid] c) key < a[mid+1] d) key > a[mid+1]
9. Which approach is commonly used to solve the 0/1 Knapsack Problem? a) Greedy
Algorithm b) Dynamic Programming c) Both d) None
10. What is the space complexity of an algorithm that creates a new array of size n?
12. The _________ of an algorithm is the amount of memory it needs to run to its completion
14.Time complexity of the recurrence relation T(n) = 4T(n/2) + n2 using the Master Theorem
is________
19. In dynamic programming, the technique of storing the previously calculated values is called
___________
21. 17. Solution of the recurrence relation T(n) = 2T(n/4) + nlogn is _________
23. Which of the following algorithms are used to find the shortest path from a source
node to all other nodes in a weighted graph?
26. Which of the following sorting algorithms provide the best time complexity in the
worst-case scenario?
Merge Sort
Quick Sort
Bubble Sort
Selection Sort
28. Kruskal’s Algorithm for finding the Minimum Spanning Tree of a graph is a kind of
a?
DP Problem
Greedy Algorithm
Adhoc Problem
None of the above