Object-Oriented Programming · ByteDance · Medium
Design a task scheduler that accepts incoming tasks and, on request, hands back the task that should be handled next. Every task carries four fields: task_id: the task's identifier, as a string seller_id: the identifier of the seller who owns the task, as a string tier: one of VIP or STANDARD priority: an integer between 1 and 3 inclusive, where a lower number means the task is more urgent Provide these two operations: The scheduler must follow these rules: Inside one…