Tap here to switch tabs
Problem
Submissions

Problem: Course Schedule III

med
30 min
Try to solve the Course Schedule III problem.

Statement

You are given an array courses where courses[i] = [duration_i, lastDay_i] indicates that the iextthi^{ ext{th}} course requires duration_i continuous days to complete and must be finished on or before day lastDay_i.

You begin on day 11 and can only take one course at a time.

Return the maximum number of courses you can finish.

Constraints:

  • 1≤1 \leq courses.length ≤104\leq 10^4

  • 1≤1 \leq duration_i, lastDay_i ≤104\leq 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Course Schedule III

med
30 min
Try to solve the Course Schedule III problem.

Statement

You are given an array courses where courses[i] = [duration_i, lastDay_i] indicates that the iextthi^{ ext{th}} course requires duration_i continuous days to complete and must be finished on or before day lastDay_i.

You begin on day 11 and can only take one course at a time.

Return the maximum number of courses you can finish.

Constraints:

  • 1≤1 \leq courses.length ≤104\leq 10^4

  • 1≤1 \leq duration_i, lastDay_i ≤104\leq 10^4