1494. Parallel Courses II
Description
**Input:** n = 4, dependencies = [[2,1],[3,1],[1,4]], k = 2
**Output:** 3
**Explanation:** The figure above represents the given graph.
In the first semester, you can take courses 2 and 3.
In the second semester, you can take course 1.
In the third semester, you can take course 4.**Input:** n = 5, dependencies = [[2,1],[3,1],[4,1],[1,5]], k = 2
**Output:** 4
**Explanation:** The figure above represents the given graph.
In the first semester, you can take courses 2 and 3 only since you cannot take more than two per semester.
In the second semester, you can take course 4.
In the third semester, you can take course 1.
In the fourth semester, you can take course 5.ac
Previous1493. Longest Subarray of 1's After Deleting One ElementNext1495. Friendly Movies Streamed Last Month
Last updated

