Question DSA-STK-0013
MediumHow can a queue be implemented using two stacks?
- A.
It can't be done
- B.
Push to an 'in' stack; pop from an 'out' stack, refilling it from 'in' only when it is empty
- C.
Sign up free to see the answer and a step-by-step explanation.