NeetCode #539LC-1834MediumHeap / Priority QueueNC 250
← Back to All Problems

#539 · #1834 · Single-Threaded CPU(单线程 CPU)

📌 Problem Statement & Constraints

You are given tasks where tasks[i] = [enqueueTime, processingTime]. A single-threaded CPU picks, at each idle moment, the available task with the smallest processing time (ties broken by index). Return the order in which the tasks are processed. Constraints: 1 <= tasks.length <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!