Implement a queue using only two stacks. This classic problem teaches how data structures can simulate each other.
The two-stack trick:
Amortized O(1) per operation — each element is moved at most twice (once into stack_in, once into stack_out).
q.peek()
1
q.pop()
1
q.empty()
False