LC: 1136. Parallel Courses
https://leetcode.com/problems/parallel-courses/
Input: n = 3, relations = [[1,3],[2,3]]
Output: 2
Explanation: The figure above represents the given graph.
In the first semester, you can take courses 1 and 2.
In the second semester, you can take course 3.Input: n = 3, relations = [[1,2],[2,3],[3,1]]
Output: -1
Explanation: No course can be studied because they are prerequisites of each other.PreviousLC: 1135. Connecting Cities With Minimum-CostNextLC: 1150. Check If a Number Is Majority Element in a Sorted Array
Last updated

