Solution: Schedule Tasks on Minimum Machines
Let's solve the Schedule Tasks on Minimum Machines problem using the Two Heaps pattern.
We'll cover the following
Statement
We are given an input array, tasks
, which contains the start and end times of tasks. Your task is to find the minimum number of machines required to complete these tasks.
Constraints:
-
tasks.length
-
tasks.length
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.