Quiz

Question 1 of 6. 0 correct, 0 incorrect.

An undirected graph has the edges A-B 4, A-C 1, C-B 2, B-D 1 and C-D 5. Put the vertices in the order Dijkstra's algorithm settles them from A.

Hint

After A, settle whichever unsettled vertex has the smallest distance, and update its neighbours before choosing again.

  1. 1B, at distance 3
  2. 2C, at distance 1
  3. 3A, at distance 0
  4. 4D, at distance 4