Improved Code and removed warnings (#482)

Improved Code and removed warnings
This commit is contained in:
Parth Shandilya
2018-10-19 13:28:21 +05:30
committed by GitHub
parent fedb3e70ab
commit 07451a6ca4
14 changed files with 33 additions and 12 deletions

View File

@@ -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]}

View File

@@ -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()]