Implement a Queue using two stacks Make it Dequeue efficient. pls tell the meaning of deque efficient explain this statement and give hint for this problem

Implement a Queue using two stacks Make it Dequeue efficient.

Hey @shrutikatyal
here u need to make deque efficient queue using stack.
that means ur pop operation must take O(1) operation and push must take O(n) operation

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.