मराठी

The data structure required for Breadth First ilaversal on a graph is ______.

Advertisements
Advertisements

प्रश्न

The data structure required for Breadth First Traversal on a graph is ______.

पर्याय

  • Stack

  • Array

  • Queue

  • Thee

MCQ
रिकाम्या जागा भरा
Advertisements

उत्तर

The data structure required for Breadth First Traversal on a graph is Queue.

Explanation:

In Breadth First Search Traversal, BFS, starting vertex is first taken and adjacent vertices which are unvisited are also taken. Again, the first vertex which was added as an unvisited adjacent vertex list will be considered to add further unvisited vertices of the graph. To get the first unvisited vertex we need to follow First In First OUT principle. Queue uses FIFO principle.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×