Skip to content
Merged
Prev Previous commit
Next Next commit
Update dijkstra.py
  • Loading branch information
AtulRajput01 authored Oct 19, 2022
commit 0b28bf972570efff61da8aa41dd2b992ed975559
7 changes: 0 additions & 7 deletions graphs/dijkstra.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ def dijkstra(self, src):
sptset = [False] * self.V

for cout in range(self.V):

# Pick the minimum distance vertex from
# the set of vertices not yet processed.
# u is always equal to src in first iteration
u = self.mindistance(dist, sptset)

# Put the minimum distance vertex in the
# shortest path tree
sptset[u] = True

# Update dist value of the adjacent vertices
Expand Down