As reported: Goldman Sachs Analyst Superday, round 2 (AWM, Bengaluru, 2025): Single-Threaded CPU.
tasks[i] = [enqueueTime, processingTime]. A single-threaded CPU, when idle, picks the available task with the shortest processing time (ties: smaller index) and runs it to completion. Return the order of task indices.
This is LeetCode 1834 — Single-Threaded CPU.
Example 1
tasks = [[1,2],[2,4],[3,2],[4,1]]
-> [0,2,3,1]
Example 2
tasks = [[7,10],[7,12],[7,5],[7,4],[7,2]]
-> [4,3,2,0,1]
Constraints: 1 ≤ n ≤ 10^5; 1 ≤ enqueueTime, processingTime ≤ 10^9.
Code runner format: one JSON value per line: tasks (LeetCode's test-case format). Implement getOrder(tasks); the harness prints the result as JSON.