Skip to content

Commit ff601f6

Browse files
committed
Three Hundred - Thirty-Two Commit: Implement edge_count() function
1 parent e9903bf commit ff601f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Section_12(Graphs)/(1)_graph.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,9 @@ def edge_count(self):
6969
for j in range(self._vertices):
7070
if self._adjacent_matrix[i][j] != 0:
7171
count = count + 1
72-
return count
72+
return count
73+
74+
def vertices_print(self):
75+
for i in range(self._vertices):
76+
print(i, end=' ')
77+
print()

0 commit comments

Comments
 (0)