Graph Algorithms MCQs

Topic-wise practice questions for Data Structures & Algorithms. Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q21hard
If a DP table for a problem has dimensions N \times W, what is the **Space Complexity** of the algorithm?
Q22easy
In string hashing, why is it common to use a Prime Number as the base (e.g., 31 or 53)?
Q23hard
What is the **Worst-Case** time complexity of Rabin-Karp?
Q24medium
What happens in KMP if the pattern character at j mismatches the text character at i, and j is greater than 0?
Q25hard
Trace the complexity of Strassen's Matrix Multiplication. It is faster than the standard O(N³) method. Which paradigm does it use?
Q26medium
A developer is optimizing a "Sudoku Solver." They add code to stop exploring a branch if a row already contains duplicate numbers. This optimization is called:
Q27hard
What is the Search Time Complexity in a Trie for a string of length L?
Q28easy
What does the "Bad Character" heuristic in Boyer-Moore do when a mismatch occurs?
Q29medium
A logistics company needs to find the absolute shortest route to visit 50 cities exactly once. This is an NP-Hard problem. What is the most realistic approach for a developer?
Q30medium
Which algorithm design technique is used in Prim's and Kruskal's algorithms for finding a Minimum Spanning Tree?