Algorithm Based Questions
Algorithm Based Questions
1. How can we compare between two algorithms written for the same problem?
2. What do you understand about the DFS (Depth First Search) algorithm.
3. What do you understand about greedy algorithms? List a few examples of greedy
algorithms.
4. Explain the Divide and Conquer Algorithmic Paradigm. Also list a few algorithms
which use this paradigm.
5. What are recursive algorithms? State the important rules which every recursive
algorithm must follow.
6. Can we use the binary search algorithm for linked lists? Justify your answer.
7. Write an algorithm to find the maximum subarray sum for a given array. In other
words, find the maximum sum that can be achieved by taking contiguous elements
from a given array of integers.
8. How do the encryption algorithms work?
9. What is the difference between comparison-based and non-comparison-based
sorting algorithms?
10. What is meant by “Sort in Place”?
11. Explain why complexity of Binary search is O (log2n) ?
12. Explain the Fibonacci sequence and how dynamic programming helps calculate
Fibonacci numbers efficiently.
13. How does dynamic programming help solve the knapsack problem efficiently?
14. What’s the difference between top-down and bottom-up dynamic programming?
15. Can you provide an example of a problem that can be solved using recursion?
16. How does recursion play a role in solving the Towers of Hanoi problem?
17. Explain what is Explicit and implicit Backtracking Constraints?
18. What is a tree in the context of data structures and algorithms?
19. What is a cycle in a graph, and how do you detect cycles algorithmically?
20. What is the difference between a graph and a digraph in terms of representation and
algorithms?