Practice Course Schedule III
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastDayi] indicate that the ith course should be taken continuously for durationi days and must be finished before or on lastDayi. You will start on the 1st day and you cannot take two or more courses simultaneously. Return the maximum number of courses that you can take.
Source: Course Schedule III on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
courses = [[100,200],[200,1300],[1000,1250],[2000,3200]]
3
# Example 2
courses = [[1,2]]
1
# Example 3
courses = [[3,2],[4,3]]
0
Constraints
Related LeetCode Problems
Practice more problems similar to Course Schedule III.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.