0% found this document useful (0 votes)
3 views6 pages

Algorithm MCQs Question Paper Set 2

Design and Analysis of Algorithm(DAA) Multiple Choice Questions(MCQ) Question_Paper with right answer

Uploaded by

er.ishakhughar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Algorithm MCQs Question Paper Set 2

Design and Analysis of Algorithm(DAA) Multiple Choice Questions(MCQ) Question_Paper with right answer

Uploaded by

er.ishakhughar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Multiple Choice Question Paper - Set 2

Note: Choose the correct option from the given choices.

1. 1. Which of the following is a characteristic of problems suitable for dynamic


programming?

 A. Optimal substructure
 B. Greedy choice property
 C. Non-overlapping subproblems
 D. No recursion

2. 2. The principle of optimality is applicable to:

 A. Divide and conquer


 B. Dynamic programming
 C. Brute force
 D. Backtracking

3. 3. Which data structure is typically used in memoization?

 A. Stack
 B. Queue
 C. Hash table
 D. Heap

4. 4. What is the recursive formula for computing binomial coefficients?

 A. C(n,k) = C(n-1,k-1) + C(n-1,k)


 B. C(n,k) = C(n+1,k+1)
 C. C(n,k) = C(n,k-1) - 1
 D. C(n,k) = C(n-1,k+1)

5. 5. What does Floyd-Warshall algorithm use to store shortest paths?

 A. Adjacency matrix
 B. Linked list
 C. Adjacency list
 D. Min-heap

6. 6. In Matrix Chain Multiplication, what is minimized?

 A. Number of matrices
 B. Total cost of multiplication
 C. Determinant value
 D. Inverse calculation

7. 7. What is the base condition in LCS dynamic programming algorithm?

 A. dp[0][j] = 0 and dp[i][0] = 0


 B. dp[i][j] = 1
 C. dp[i][j] = -1
 D. dp[i][j] = i+j

8. 8. Which approach stores solutions to subproblems for later reuse?

 A. Recursion
 B. Iteration
 C. Memoization
 D. Sorting

9. 9. What is the time complexity of Floyd-Warshall algorithm?

 A. O(V)
 B. O(V²)
 C. O(V³)
 D. O(E log V)

10. 10. Which application uses Longest Common Subsequence (LCS)?

 A. Network routing
 B. DNA sequence alignment
 C. Huffman coding
 D. Tree traversal
11. 11. Which of the following algorithms is not a greedy algorithm?

 A. Dijkstra
 B. Kruskal
 C. Prim
 D. Bellman-Ford

12. 12. Which algorithm always finds a minimum spanning tree?

 A. DFS
 B. Kruskal
 C. BFS
 D. Bellman-Ford

13. 13. What is the key idea behind Prim's algorithm?

 A. Add minimum weight edge


 B. Remove maximum edge
 C. Explore all nodes
 D. Visit deepest node

14. 14. Which sorting technique is used in Kruskal’s algorithm?

 A. Merge sort
 B. Bubble sort
 C. Edge weight sorting
 D. Degree-based sorting

15. 15. Which algorithm ensures shortest path from a single source to all nodes?

 A. Huffman
 B. Dijkstra
 C. Kruskal
 D. Prim

16. 16. Which algorithm is used in compression utilities like WinZip?

 A. Dijkstra
 B. Floyd
 C. Huffman
 D. Bellman-Ford

17. 17. How does Huffman algorithm build a tree?

 A. Bottom-up combining least frequent nodes


 B. Top-down from root
 C. Randomly
 D. Breadth-first

18. 18. Which algorithm is used in finding maximum flow in networks?

 A. Dijkstra
 B. Ford-Fulkerson
 C. Huffman
 D. Prim

19. 19. What is the worst-case time complexity of Ford-Fulkerson algorithm?

 A. O(V)
 B. O(E log V)
 C. O(E * max flow)
 D. O(E²)

20. 20. What is a lower bound in algorithm analysis?

 A. Maximum time an algorithm can take


 B. Minimum time any algorithm can take
 C. Best case scenario
 D. Random guess

21. 21. Which problem is commonly solved using backtracking?

 A. Linear search
 B. Tower of Hanoi
 C. N-Queens
 D. Binary Search
22. 22. Backtracking differs from brute force in that it:

 A. Explores all options


 B. Explores all options blindly
 C. Eliminates infeasible paths early
 D. Uses iteration only

23. 23. What condition leads to backtracking in N-Queens problem?

 A. Two queens attack each other


 B. All queens placed
 C. No queens placed
 D. Diagonal check fails

24. 24. What is the goal in the Hamiltonian Circuit problem?

 A. Visit every edge


 B. Visit every vertex exactly once and return
 C. Shortest path
 D. DFS traversal

25. 25. In subset-sum, the problem becomes infeasible when:

 A. Sum exceeds target


 B. Sum equals target
 C. Sum is zero
 D. List is empty

26. 26. Branch and Bound is used when:

 A. Greedy fails
 B. Backtracking fails
 C. Solution needs bounding function
 D. Input is sorted

27. 27. Which of these is NP-Hard?

 A. Linear search
 B. Vertex cover
 C. Binary search
 D. Matrix multiplication

28. 28. Vertex cover aims to:

 A. Cover all vertices


 B. Minimize edge weights
 C. Cover all edges with few vertices
 D. Maximize nodes

29. 29. Set covering problem is a generalization of:

 A. Vertex cover
 B. Subset sum
 C. Hamiltonian circuit
 D. Sorting

30. 30. Which algorithm gives an approximate solution for bin packing?

 A. Best Fit
 B. Dijkstra
 C. Prim
 D. Kruskal

You might also like