guess the next step: Bellman-Ford shortest paths
Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.
Step 19 of 36
Question 19 of 34
Step 19 of 36
Step 20 of 36
Step 21 of 36
Step 22 of 36
Step 23 of 36
Step 24 of 36
Step 25 of 36
Question 19 of 34
Question 19 of 34
Not this time.
You guessed: Through E, the way to F is shorter than any found before, so write it.
What the run did:
The road from E to F is 3 long, so through E it is 5 to F, no shorter than the 5 written there. Keep 5.
Question 19 of 34
Right.
You guessed: Through E, the way to F is no shorter, so keep what is written.
What the run did:
The road from E to F is 3 long, so through E it is 5 to F, no shorter than the 5 written there. Keep 5.
Question 20 of 34
Question 20 of 34
Not this time.
You guessed: Through F, the way to B is shorter than any found before, so write it.
What the run did:
The road from F to B is -4 long, so through F it is 1 to B, no shorter than the 1 written there. Keep 1.
Question 20 of 34
Right.
You guessed: Through F, the way to B is no shorter, so keep what is written.
What the run did:
The road from F to B is -4 long, so through F it is 1 to B, no shorter than the 1 written there. Keep 1.
Question 21 of 34
Question 21 of 34
Not this time.
You guessed: Through F, the way to G is shorter than any found before, so write it.
What the run did:
The road from F to G is 7 long, so through F it is 12 to G, no shorter than the 4 written there. Keep 4.
Question 21 of 34
Right.
You guessed: Through F, the way to G is no shorter, so keep what is written.
What the run did:
The road from F to G is 7 long, so through F it is 12 to G, no shorter than the 4 written there. Keep 4.
Question 22 of 34
Question 22 of 34
Not this time.
You guessed: Through G, the way to H is shorter than any found before, so write it.
What the run did:
The road from G to H is 1 long, so through G it is 5 to H, no shorter than the 5 written there. Keep 5.
Question 22 of 34
Right.
You guessed: Through G, the way to H is no shorter, so keep what is written.
What the run did:
The road from G to H is 1 long, so through G it is 5 to H, no shorter than the 5 written there. Keep 5.
Question 23 of 34
Question 23 of 34
Right.
You guessed: Look along every road in a round.
What the run did:
Round 3: look along every road from a place with a distance, in letter order.
Question 23 of 34
Not this time.
You guessed: This round made nothing shorter, so every distance is final.
What the run did:
Round 3: look along every road from a place with a distance, in letter order.
Question 23 of 34
Not this time.
You guessed: That was the last round needed, so look along every road once more.
What the run did:
Round 3: look along every road from a place with a distance, in letter order.
Question 24 of 34
Question 24 of 34
Not this time.
You guessed: Through A, the way to B is shorter than any found before, so write it.
What the run did:
The road from A to B is 6 long, so through A it is 6 to B, no shorter than the 1 written there. Keep 1.
Question 24 of 34
Right.
You guessed: Through A, the way to B is no shorter, so keep what is written.
What the run did:
The road from A to B is 6 long, so through A it is 6 to B, no shorter than the 1 written there. Keep 1.