Graph, Graph Algorithm.
We initialize the distances as described above in Line 34. Then, we iterate the while loop from Line 36 to Line 58 until the variable distances does not change. To check if the variable distances has changed in each loop, we use a variable, called is_updated in Line 37. If the variable distances