diff --git a/graphs/dijkstra_2.py b/graphs/dijkstra_2.py index a0fb46bd4..832296612 100644 --- a/graphs/dijkstra_2.py +++ b/graphs/dijkstra_2.py @@ -56,9 +56,9 @@ def dijkstra(graph, v, src): Example: >>> graph = [[0.0, 2.0, float('inf'), 1.0], - [2.0, 0.0, 4.0, float('inf')], - [float('inf'), 4.0, 0.0, 3.0], - [1.0, float('inf'), 3.0, 0.0]] + ... [2.0, 0.0, 4.0, float('inf')], + ... [float('inf'), 4.0, 0.0, 3.0], + ... [1.0, float('inf'), 3.0, 0.0]] >>> dijkstra(graph, 4, 0) Vertex Distance 0 0 @@ -102,4 +102,4 @@ if __name__ == "__main__": graph[src][dst] = weight gsrc = int(input("\nEnter shortest path source:").strip()) - dijkstra(graph, V, gsrc) \ No newline at end of file + dijkstra(graph, V, gsrc)