Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Which of the following data structure is usef... Start Learning for Free
Which of the following data structure is useful in traversing a given graph by breadth first search?
  • a)
    Stack
  • b)
    List
  • c)
    Queue
  • d)
    None of the above.
Correct answer is option 'C'. Can you explain this answer?
Most Upvoted Answer
Which of the following data structure is useful in traversing a given ...
Breadth First Search (BFS) Algorithm

The Breadth First Search (BFS) algorithm is used to traverse a graph, starting from a source vertex, in a breadth-first manner. It visits all the vertices at the same level before moving to the next level.

Data Structures Used in BFS

BFS algorithm uses a queue data structure to keep track of the vertices that have been visited but not yet explored. The queue is used to maintain the order in which the vertices are visited so that the algorithm can visit them in a breadth-first manner.

Why Queue is used in BFS?

A queue is used in BFS because it follows the First In First Out (FIFO) principle, which makes it easy to maintain the order of visited vertices. The algorithm visits the vertices in the order in which they were added to the queue. This helps to ensure that the algorithm visits all the vertices at the same level before moving to the next level.

Conclusion

In conclusion, the correct answer to the given question is option 'C'. A queue data structure is useful in traversing a given graph by breadth-first search because it maintains the order in which the vertices are visited, making it easy to visit all the vertices at the same level before moving to the next level. It is important to understand the data structures used in BFS to effectively implement the algorithm.
Free Test
Community Answer
Which of the following data structure is useful in traversing a given ...
BFS performs level-order traversal which can be fairly done using a queue. A queue uses FIFO ordering and the nodes that we enqueue first are explored first maintaining the order of traversal.
Explore Courses for Computer Science Engineering (CSE) exam
Question Description
Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer?.
Solutions for Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer?, a detailed solution for Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following data structure is useful in traversing a given graph by breadth first search?a)Stackb)Listc)Queued)None of the above.Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam
Signup to solve all Doubts
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev