Graph Traversal: BFS and DFS - Complexity Analysis - Numerical Applications

Download Q&A
Q. What is the primary application of DFS in graph theory?
  • A. Finding shortest paths
  • B. Topological sorting
  • C. Finding minimum spanning tree
  • D. Finding connected components
Q. What is the worst-case time complexity of DFS on a graph?
  • A. O(V + E)
  • B. O(V^2)
  • C. O(E)
  • D. O(V)
Q. Which algorithm is better for finding connected components in a graph?
  • A. BFS
  • B. DFS
  • C. Both are equally good
  • D. None of the above
Q. Which of the following is true about BFS?
  • A. It uses a stack
  • B. It finds the shortest path in unweighted graphs
  • C. It is faster than DFS
  • D. It cannot be implemented recursively
Q. Which traversal method is guaranteed to find the shortest path in a weighted graph?
  • A. BFS
  • B. DFS
  • C. Dijkstra's Algorithm
  • D. A* Search
Showing 1 to 5 of 5 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely