📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which data structure is typically used to implement

      Breadth-First Search (BFS)?
      A Stack Correct Answer Incorrect Answer
      B Heap Correct Answer Incorrect Answer
      C Queue Correct Answer Incorrect Answer
      D Hash Table Correct Answer Incorrect Answer
      E Priority Queue Correct Answer Incorrect Answer

      Solution

      BFS explores all the neighbor nodes at the current depth level before moving on to the nodes at the next depth level. A queue is perfectly suited for this "first-in, first-out" (FIFO) behavior, ensuring that nodes are visited level by level.

      Practice Next
      ask-question