Skip to main content

Design and Analysis of Algorithms MCQs with Answers

Practice important Design and Analysis of Algorithms MCQs with answers and explanations.

Multiple Choice Questions

Q291: Which type of graph does Dijkstra's algorithm not handle properly?
  • A: Directed graphs
  • B: Weighted graphs
  • C: Graphs with negative edge weights
  • D: Undirected graphs
View Answer
C

Q292: The algorithm that works by merging two trees together to form a minimum spanning tree is called _______.
  • A: Prim's algorithm
  • B: Dijkstra's algorithm
  • C: Kruskal's algorithm
  • D: BFS
View Answer
C

Q293: Which step is NOT part of the Prim's algorithm process?
  • A: Initializing key values
  • B: Extracting the minimum key vertex
  • C: Calculating edge weights
  • D: Updating predecessor pointers
View Answer
C

Q294: In the context of Dijkstra's algorithm, the predecessor pointer is used to _______.
  • A: Track the path taken
  • B: Store the shortest edge weight
  • C: Determine the cycle in a graph
  • D: Count the number of edges
View Answer
A

Q295: What design paradigms are commonly used in algorithmic problem solving?
  • A: Divide-and-conquer, greedy, dynamic programming
  • B: Linear programming, brute force, backtracking
  • C: Greedy, exhaustive search, divide-and-conquer
  • D: Dynamic programming, binary search, randomization
View Answer
A

Q296: What happens when an algorithm runs in exponential time?
  • A: It terminates quickly for large inputs
  • B: It runs indefinitely for large inputs
  • C: It has a constant running time
  • D: It is easy to solve for all inputs
View Answer
B

Q297: A problem that can be solved in polynomial time is considered:
  • A: Easy
  • B: Hard
  • C: Unsolvable
  • D: NP-complete
View Answer
A

Q298: Decision problems typically have outputs of:
  • A: Strings
  • B: Integers
  • C: Yes/No
  • D: Arrays
View Answer
C

Q299: Class P contains problems that can be solved in:
  • A: Exponential time
  • B: Constant time
  • C: Polynomial time
  • D: Logarithmic time
View Answer
C

Q300: Which of the following is a characteristic of NP-complete problems?
  • A: They are easy to solve
  • B: They can be solved in polynomial time
  • C: If one can be solved in polynomial time, all can be
  • D: They are not solvable
View Answer
C

Test Your Knowledge

Take a timed quiz on Design and Analysis of Algorithms

🚀 Start Quiz Now