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

Q271: Which of the following is true regarding the finish times in DFS?
  • A: They are always in increasing order
  • B: They are always in decreasing order
  • C: They can be in any order
  • D: They depend on the graph structure
View Answer
C

Q272: To find strong components, we must first compute ______. The adjacency matrix
  • A: The reversed topological order
  • B: The component DAG
  • C: The spanning tree
  • D:
View Answer
C

Q273: Kruskal's and Prim's algorithms are used to find ______. Strong components
  • A: Minimum spanning trees
  • B: Shortest paths
  • C: Connected components
  • D:
View Answer
B

Q274: The weight of a minimum spanning tree is the ______. Total cost of edges included in the tree
  • A: Total number of vertices in the graph
  • B: Number of edges minus one
  • C: Total number of paths in the graph
  • D:
View Answer
A

Q275: What happens when an edge is added to a free tree?
  • A: It creates a cycle
  • B: It connects all components
  • C: It increases the tree size
  • D: Nothing happens
View Answer
A

Q276: A minimum spanning tree is a tree of ______. Maximum weight
  • A: Minimum weight
  • B: Average weight
  • C: Total weight
  • D:
View Answer
B

Q277: Which algorithm always selects the cheapest option at each stage?
  • A: Greedy algorithm
  • B: Brute force algorithm
  • C: Backtracking algorithm
  • D: None of the above
View Answer
A

Q278: The execution of the strong components algorithm operates in ______ time. Θ(V + E)
  • A: Θ(V^2)
  • B: Θ(E^2)
  • C: Θ(VE)
  • D:
View Answer
A

Q279: What does Prim's algorithm primarily focus on adding to the minimum spanning tree?
  • A: Edges
  • B: Vertices
  • C: Leaves
  • D: Cycles
View Answer
C

Q280: In Prim's algorithm, what is used to store the lightest edge weights?
  • A: Priority queue
  • B: Stack
  • C: Array
  • D: Linked list
View Answer
A

Test Your Knowledge

Take a timed quiz on Design and Analysis of Algorithms

🚀 Start Quiz Now