From 82f098612a772b399c676aa91660fdb6390f1229 Mon Sep 17 00:00:00 2001 From: lubaso Date: Sat, 7 Oct 2023 00:46:29 -0300 Subject: [PATCH] Add doctest to dijkstra-algorithm --- graphs/dijkstra_2.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/graphs/dijkstra_2.py b/graphs/dijkstra_2.py index aceab6f47..9ca94a635 100644 --- a/graphs/dijkstra_2.py +++ b/graphs/dijkstra_2.py @@ -9,12 +9,12 @@ def print_dist(dist, v): Example: >>> print_dist([0.0, 2.0, 3.0, float('inf')], 4) Vertex Distance - 0 0 - 1 2 - 2 3 - 3 INF + 0 0 + 1 2 + 2 3 + 3 INF """ - print("\nVertex Distance") + print("Vertex Distance") for i in range(v): if dist[i] != float("inf"): print(i, "\t", int(dist[i]), end="\t")