Skip to content

Commit b139a51

Browse files
committed
modify time and space complexity
1 parent a05471f commit b139a51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

course-schedule/yolophg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Time Complexity: O(m * n)
2-
// Space Complexity: O(m * n)
1+
// Time Complexity: O(numCourses * E)
2+
// Space Complexity: O(numCourses * E)
33

44
// initialize an array to keep track of the in-degrees for each course
55
let inDegree = new Array(numCourses).fill(0);

0 commit comments

Comments
 (0)