Graph Traversal: BFS and DFS - Applications - Competitive Exam Level

Download Q&A
Q. In a tree, which traversal method is equivalent to a level order traversal?
  • A. DFS
  • B. BFS
  • C. In-order
  • D. Pre-order
Q. What is the space complexity of BFS in the worst case?
  • A. O(V)
  • B. O(E)
  • C. O(V + E)
  • D. O(V^2)
Q. Which algorithm is typically used for finding the shortest path in a weighted graph?
  • A. DFS
  • B. BFS
  • C. Dijkstra's Algorithm
  • D. Prim's Algorithm
Q. Which of the following applications can be solved using BFS?
  • A. Finding connected components
  • B. Topological sorting
  • C. Cycle detection
  • D. Finding strongly connected components
Q. Which of the following is a characteristic of Depth-First Search (DFS)?
  • A. Uses a queue
  • B. Can be implemented using recursion
  • C. Always finds the shortest path
  • D. Visits nodes level by level
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