Implement a min-heap-based scheduler. Each task: { id, priority }.Lower priority number = higher priority. Process in priority order;break ties by insertion order.
{ id, priority }
solve(tasks) returns processing order.
solve(tasks)
Sample tests