Skip to content

Commit

Permalink
Update 0210-course-schedule-ii.go
Browse files Browse the repository at this point in the history
  • Loading branch information
superj80820 authored Dec 2, 2024
1 parent 06e8a60 commit 2bdcbd6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions neetcode/0210-course-schedule-ii.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// `e` is number of prerequisites
func findOrder(numCourses int, prerequisites [][]int) []int {
preMap := make(map[int][]int)
for i := 0; i < numCourses; i++ {
preMap[i] = []int{}
}
for _, prerequisite := range prerequisites {
preMap[prerequisite[0]] = append(preMap[prerequisite[0]], prerequisite[1])
}
Expand Down Expand Up @@ -46,4 +43,4 @@ func findOrder(numCourses int, prerequisites [][]int) []int {
}
}
return res
}
}

0 comments on commit 2bdcbd6

Please sign in to comment.