

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: What Is a Queue?
incomplete
2: Queue Class
incomplete
3: Queue Speed
incomplete
4: Matchmaking Queue
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
LockedIn uses a Queue to keep track of the order that recruiters should use to reach out to job seekers.
Implement the following operations on the Queue class:
queue.push(item): Adds an item to the tail of the queue (index 0 of list)queue.pop(): Removes and returns an item from the head of the queue (last index of list)queue.peek(): Returns an item from the head of the queuequeue.size(): Returns the number of items in the queueNote: You'll often hear words used interchangeably in programming. For example, here we're saying push and pop, but enqueue and dequeue are also common words for the same ideas.
| term 1 | term 2 | description |
|---|---|---|
| Push | Enqueue | Adds an item to the tail of the queue |
| Pop | Dequeue | Removes and returns an item from the head of the queue |
List. Don't forget to guard against IndexErrors by returning 'None' if the queue is empty.