Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ degree
Method
degree
graphs/directed_and_undirected_weighted_graph.py:368–369 ·
view source on GitHub ↗
(self, u)
Source
from the content-addressed store, hash-verified
366
return
visited
367
368
def
degree(self, u):
369
return
len(self.graph[u])
370
371
def
cycle_nodes(self):
372
stack = []
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected