Video solution will be uploaded soon.
A double-ended queue (deque) supports adding and removing items from both ends of the queue. The operations supported by deque are AddFront, AddRear, RemoveFront and RemoveRear. You are given only stacks to implement this data structure. You can implement only push and pop operations. What is the... | Watch the step-by-step video solution for this NIMCET PYQ.