mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Improved Code and removed warnings (#482)
Improved Code and removed warnings
This commit is contained in:
@@ -37,7 +37,7 @@ def computeAP(l):
|
||||
|
||||
for x in range(len(isArt)):
|
||||
if isArt[x] == True:
|
||||
print(x, end=" ")
|
||||
print(x)
|
||||
|
||||
# Adjacency list of graph
|
||||
l = {0:[1,2], 1:[0,2], 2:[0,1,3,5], 3:[2,4], 4:[3], 5:[2,6,8], 6:[5,7], 7:[6,8], 8:[5,7]}
|
||||
|
||||
@@ -101,8 +101,8 @@ def PrimsAlgorithm(l):
|
||||
return TreeEdges
|
||||
|
||||
# < --------- Prims Algorithm --------- >
|
||||
n = int(input("Enter number of vertices: "))
|
||||
e = int(input("Enter number of edges: "))
|
||||
n = int(raw_input("Enter number of vertices: "))
|
||||
e = int(raw_input("Enter number of edges: "))
|
||||
adjlist = defaultdict(list)
|
||||
for x in range(e):
|
||||
l = [int(x) for x in input().split()]
|
||||
|
||||
Reference in New Issue
Block a user