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 13 of 36
Question 13 of 34
Step 13 of 36
Step 14 of 36
Step 15 of 36
Step 16 of 36
Step 17 of 36
Step 18 of 36
Step 19 of 36
Question 13 of 34
Question 13 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 13 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.
Question 14 of 34
Question 14 of 34
Not this time.
You guessed: Through A, the way to E is shorter than any found before, so write it.
What the run did:
The road from A to E is 2 long, so through A it is 2 to E, no shorter than the 2 written there. Keep 2.
Question 14 of 34
Right.
You guessed: Through A, the way to E is no shorter, so keep what is written.
What the run did:
The road from A to E is 2 long, so through A it is 2 to E, no shorter than the 2 written there. Keep 2.
Question 15 of 34
Question 15 of 34
Right.
You guessed: Through B, the way to C is shorter than any found before, so write it.
What the run did:
The road from B to C is 5 long, so through B it is 6 to C, shorter than any way found before. Write 6 at C.
Question 15 of 34
Not this time.
You guessed: Through B, the way to C is no shorter, so keep what is written.
What the run did:
The road from B to C is 5 long, so through B it is 6 to C, shorter than any way found before. Write 6 at C.
Question 16 of 34
Question 16 of 34
Right.
You guessed: Through C, the way to D is shorter than any found before, so write it.
What the run did:
The road from C to D is 2 long, so through C it is 8 to D, shorter than any way found before. Write 8 at D.
Question 16 of 34
Not this time.
You guessed: Through C, the way to D is no shorter, so keep what is written.
What the run did:
The road from C to D is 2 long, so through C it is 8 to D, shorter than any way found before. Write 8 at D.
Question 17 of 34
Question 17 of 34
Right.
You guessed: Through C, the way to G is shorter than any found before, so write it.
What the run did:
The road from C to G is -2 long, so through C it is 4 to G, shorter than any way found before. Write 4 at G.
Question 17 of 34
Not this time.
You guessed: Through C, the way to G is no shorter, so keep what is written.
What the run did:
The road from C to G is -2 long, so through C it is 4 to G, shorter than any way found before. Write 4 at G.
Question 18 of 34
Question 18 of 34
Right.
You guessed: Through D, the way to H is shorter than any found before, so write it.
What the run did:
The road from D to H is -3 long, so through D it is 5 to H, shorter than any way found before. Write 5 at H.
Question 18 of 34
Not this time.
You guessed: Through D, the way to H is no shorter, so keep what is written.
What the run did:
The road from D to H is -3 long, so through D it is 5 to H, shorter than any way found before. Write 5 at H.