Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ff601f6

Browse files
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

Lines changed: 6 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /