In BFS, vertices are explored level by level, starting from the:

2025

In BFS, vertices are explored level by level, starting from the:

  1. A.

    Deepest level

  2. B.

    Shallowest level

  3. C.

    Middle level

  4. D.

    Highest degree vertex

Attempted by 300 students.

Show answer & explanation

Correct answer: B

BFS (Breadth-First Search) explores vertices level by level, starting from the source vertex, which is at the shallowest level. It visits all vertices at the current level before moving to the next level. This ensures that vertices are processed in order of their distance from the source.

हिन्दी उत्तर: BFS (चौड़ाई-पहले खोज) वर्टेक्स को स्तर दर स्तर खोजता है, जिसमें स्रोत वर्टेक्स से शुरू होता है, जो सबसे उथले स्तर पर होता है। यह वर्टेक्स को वर्तमान स्तर पर देखने के बाद अगले स्तर पर जाता है। इससे यह सुनिश्चित होता है कि वर्टेक्स स्रोत से दूरी के आधार पर प्रोसेस किए जाते हैं।

Explore the full course: Bpsc