Skip to content

Commit e9629f7

Browse files
committed
edit : correct DaleStudy#261 code comments
1 parent ac155d9 commit e9629f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

course-schedule/EGON.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool:
1717
1818
Memory: 17.85 MB (Beats 99.94%)
1919
Space Complexity: O(c)
20-
- graph 변수 사용에 O(c)
20+
- graph 변수 사용에 O(c + p)
2121
- rank 변수 사용에 O(c)
2222
- queue 변수 사용에서 최대 크기는 graph의 크기와 같으므로 O(c)
23-
> O(c) + O(c) + O(c) ~= O(c)
23+
> O(c + p) + O(c) + O(c) ~= O(c + p)
2424
"""
2525
def solve_topological_sort(self, numCourses: int, prerequisites: List[List[int]]) -> bool:
2626
graph = {i: [] for i in range(numCourses)}

0 commit comments

Comments
 (0)