Mark As Completed Discussion

Let's test your knowledge. Fill in the missing part by typing it in.

In the previous lesson, we discussed two design problems related to queues: implementing a circular queue and implementing a priority queue. Now, let's solve another design problem!

Design Problem 3: Implement a __ Queue

Problem Statement: Design and implement a queue data structure that supports the following operations:

  1. enQueue: Insert an element into the queue;
  2. deQueue: Delete an element from the queue;
  3. isEmpty: Check whether the queue is empty or not;
  4. Front: Get the front item from the queue;
  5. Rear: Get the last item from the queue.

For this design problem, you are not allowed to use arrays or linked lists for implementing the queue. Think of a different approach and implement the queue using other data structures or techniques. Try to optimize the time complexity of the operations as much as possible.

Fill in the blank with the name of the queue you would use to solve this design problem.

Write the missing line below.