Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ dfs_time
Method
dfs_time
graphs/directed_and_undirected_weighted_graph.py:479–483 ·
view source on GitHub ↗
(self, s=-2, e=-1)
Source
from the content-addressed store, hash-verified
477
return
list(self.graph)
478
479
def
dfs_time(self, s=-2, e=-1):
480
begin = time()
481
self.dfs(s, e)
482
end = time()
483
return
end - begin
484
485
def
bfs_time(self, s=-2):
486
begin = time()
Callers
nothing calls this directly
Calls
1
dfs
Method · 0.95
Tested by
no test coverage detected