Level: L4
Years of Experience: 6
Questions Asked: Implement a task queue
They want you to implement a task queue that can store and execute tasks. The tasks are async so make sure you know how to use Promise. They asked a bunch of followups. One followup was every time when the queue receives the 11th task, clear the queue. Another was if the tasks have priorities attached to them, how do you find and execute the one that has the highest priority?