Practicing for Queue using Stacks of Data Structure

Questions 1 of 10
  • Q. A Double-ended queue supports operations such as adding and removing items from both the sides of the queue. They support four operations like addFront, addRear, removeFront and removeRear. You are given only stacks to implement this data structure. You can implement only push and pop operations. What are the total number of stacks required for this operation?