Graph Traversal: BFS and DFS - Higher Difficulty Problems

Download Q&A
Q. In a graph, which traversal method uses a queue data structure?
  • A. DFS
  • B. BFS
  • C. Both DFS and BFS
  • D. Neither DFS nor BFS
Q. What is the primary data structure used in DFS?
  • A. Array
  • B. Stack
  • C. Queue
  • D. Linked List
Q. Which of the following is a disadvantage of DFS?
  • A. It can get stuck in deep paths.
  • B. It requires more memory than BFS.
  • C. It cannot be implemented recursively.
  • D. It is slower than BFS.
Showing 1 to 3 of 3 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely