What is the primary data structure used in Breadth-First Search (BFS)?

Practice Questions

1 question
Q1
What is the primary data structure used in Breadth-First Search (BFS)?
  1. Stack
  2. Queue
  3. Array
  4. Linked List

Questions & Step-by-step Solutions

1 item
Q
Q: What is the primary data structure used in Breadth-First Search (BFS)?
Solution: BFS uses a queue to keep track of the nodes that need to be explored next.
Steps: 5

Related Questions

Soulshift Feedback ×

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

Not likely Very likely