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 48d4b59

Browse files
refactor: update undirected_path_v2.py
1 parent 5a361ef commit 48d4b59

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

‎graphs/undirected_path/undirected_path_v2.py‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,7 @@ def has_path(graph: dict[int, list[int]], src: int, dst: int, visited: set[int])
9191

9292
return False # If no path is found from any neighbor, return False
9393

94-
95-
# Docstring Section
96-
9794
# Time Complexity: O(E)
9895
# The time complexity of this algorithm is O(E), where E is the number of edges in the graph.
9996

100-
Space: O(e)
101-
102-
"""
103-
97+
# Space: O(e)

0 commit comments

Comments
(0)

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