In BFS, what is the initial distance (d[v]) assigned to all vertices except…

2025

In BFS, what is the initial distance (d[v]) assigned to all vertices except the source?

Answer: D. infinity

  1. A.

    0

  2. B.

    1

  3. C.

    -1

  4. D.

    infinity

Attempted by 329 students.

Show answer & explanation

Correct answer: D

Explore the full course: Mppsc Assistant Professor Computer Science Paper 2

Loading lesson…