← 返回 citadel 的题目列表Task Scheduler Supporting Insert-Delete
类型:online_judge
Implement a system that supports task insertion, deletion, and execution. The implementation should use a priority queue with lazy deletion.
Example
Input
"add task1 with priority 1, add task3 with priority 3, add task2 with priority 2, delete task1, execute task"
Output
"task2"