Which of the following data structures is used to implement a Breadth-First…

2025

Which of the following data structures is used to implement a Breadth-First Search (BFS) algorithm ?

Answer: B. QueueBFS uses a Queue data structure because it follows FIFO order to explore nodes level by level. This ensures all neighbors at current depth are processed…

  1. A.

    Stack

  2. B.

    Queue

  3. C.

    Tree

  4. D.

    Array

Attempted by 800 students.

Show answer & explanation

Correct answer: B

BFS uses a Queue data structure because it follows FIFO order to explore nodes level by level. This ensures all neighbors at current depth are processed before moving deeper.

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…