Medium
,Array
,Heap
,Sorting
You are given n
tasks labeled from 0
to n - 1
represented by a 2D integer array tasks, where tasks[i]
= [, ] means that the ith task will be available to process at and will take to finish processing.
You have a single-threaded CPU that can process at most one task at a time and will act in the following way:
Return the order in which the CPU will process the tasks.
Example 1:
Example 2:
Constraints:
tasks.length
== n
n
<= 105玉山Thu, Dec 29, 2022 12:16 PM