Schedule Tasks on Minimum Machines

Try to solve the Schedule Tasks on Minimum Machines problem.

Statement

We are given an input array, tasks, which contains the start and end times of nn tasks. Your task is to find the minimum number of machines required to complete these nn tasks.

Constraints:

  • n==n == tasks.length
  • 1<=1 <= tasks.length <=103<= 10^{3}
  • 00 ≤\leq tasksi.starttasks_{i}.start <\lt tasksi.endtasks_{i}.end ≤\leq 10410^{4}

Examples

Create a free account to view this lesson.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy