DAA QB BANK
DAA QB BANK
Two-Mark Questions:
1. Define an algorithm.
2. What is the purpose of algorithm analysis?
3. List the steps in the divide-and-conquer approach.
4. Define asymptotic notation.
5. What is the difference between Big-O, Omega, and Theta notations?
6. Explain the best-case and worst-case complexity of an algorithm.
7. Define average-case complexity.
8. State the time complexity of merge sort.
9. What is a recurrence relation?
10. Write the recurrence relation for binary search.
11. Explain the concept of recursion in algorithms.
12. What is the time complexity of Quick Sort in the worst case?
13. Define tail recursion.
14. Write the general form of Master’s theorem.
15. What is the significance of asymptotic notations?
16. How do you compare two algorithms using complexity?
17. Define space complexity and its importance.
18. What is the purpose of the divide-and-conquer technique?
19. Write the base case for a recursive function.
20. What is meant by input size in complexity analysis?
21. State one advantage of iterative algorithms over recursive ones.
22. What is the importance of algorithm correctness?
23. How is Big-O notation represented graphically?
24. Define the height of a recursion tree.
25. Explain the relationship between recursion and divide-and-conquer.
26. What is the importance of a base case in recursion?
27. State one disadvantage of recursive algorithms.
28. List two real-world applications of divide-and-conquer.
29. How does binary search differ from linear search?
30. Define exponential time complexity.
16 Mark Questions:
16 Mark Questions:
1. Explain the greedy algorithm with examples like fractional knapsack or activity selection problem.
2. Discuss Kruskal’s and Prim’s algorithms for finding a minimum spanning tree.
3. Solve the single-source shortest path problem using Dijkstra’s algorithm.
4. Describe how TSP can be solved using brute force.
5. Compare the brute force and greedy approaches in solving problems.
Unit 3: Dynamic Programming and Backtracking
Two-Mark Questions:
16 Mark Questions:
16 Mark Questions:
1. Explain the stable marriage problem and derive a solution using the Gale-Shapley algorithm.
2. Discuss the Hopcroft-Karp algorithm for maximum matching in bipartite graphs.
3. Solve a maximum flow problem using the Ford-Fulkerson method.
4. Explain how constraints are handled in optimization problems.
5. Explain in detail about simple method.
Unit 5: NP-Completeness and Approximation Algorithms
Two-Mark Questions:
16 Mark Questions: