Dequeue efficient queue using stack

Implement a Queue using two stacks Make it Dequeue efficient.

Input Format
Enter the size of the queue N add 0 - N-1 numbers in the queue

Constraints
Output Format
Display the numbers in the order they are dequeued and in a space separated manner

Sample Input
5
Sample Output
0 1 2 3 4

solution link: https://ide.codingblocks.com/s/297016

what is wrong in this code?

hello @1799sanya

here u need to make deque efficient queue using stack.
that means ur deque operation must take O(1) operation and enque must take O(n) operation
but in ur implementation u r doing reverse.

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.