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 31
Question 19 of 29
Step 19 of 31
Step 20 of 31
Step 21 of 31
Step 22 of 31
Step 23 of 31
Step 24 of 31
Step 25 of 31
Question 19 of 29
Question 19 of 29
Not this time.
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 -9 long, so through B it is -18 to C, no shorter than the -18 written there. Keep -18.
Question 19 of 29
Right.
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 -9 long, so through B it is -18 to C, no shorter than the -18 written there. Keep -18.
Question 20 of 29
Question 20 of 29
Not this time.
You guessed: Through B, the way to F is shorter than any found before, so write it.
What the run did:
The road from B to F is -9 long, so through B it is -18 to F, no shorter than the -18 written there. Keep -18.
Question 20 of 29
Right.
You guessed: Through B, the way to F is no shorter, so keep what is written.
What the run did:
The road from B to F is -9 long, so through B it is -18 to F, no shorter than the -18 written there. Keep -18.
Question 21 of 29
Question 21 of 29
Not this time.
You guessed: Through B, the way to G is shorter than any found before, so write it.
What the run did:
The road from B to G is -9 long, so through B it is -18 to G, no shorter than the -36 written there. Keep -36.
Question 21 of 29
Right.
You guessed: Through B, the way to G is no shorter, so keep what is written.
What the run did:
The road from B to G is -9 long, so through B it is -18 to G, no shorter than the -36 written there. Keep -36.
Question 22 of 29
Question 22 of 29
Not this time.
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 -9 long, so through C it is -27 to D, no shorter than the -27 written there. Keep -27.
Question 22 of 29
Right.
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 -9 long, so through C it is -27 to D, no shorter than the -27 written there. Keep -27.
Question 23 of 29
Question 23 of 29
Not this time.
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 -9 long, so through C it is -27 to G, no shorter than the -36 written there. Keep -36.
Question 23 of 29
Right.
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 -9 long, so through C it is -27 to G, no shorter than the -36 written there. Keep -36.
Question 24 of 29
Question 24 of 29
Not this time.
You guessed: Through D, the way to G is shorter than any found before, so write it.
What the run did:
The road from D to G is -9 long, so through D it is -36 to G, no shorter than the -36 written there. Keep -36.
Question 24 of 29
Right.
You guessed: Through D, the way to G is no shorter, so keep what is written.
What the run did:
The road from D to G is -9 long, so through D it is -36 to G, no shorter than the -36 written there. Keep -36.