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 10610^{6}

Examples

Create a free account to view this lesson.

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