LeetCode: https://leetcode.com/problems/implement-queue-using-stacks/
Implement a first in first out (FIFO) queue using only two stacks.
1
0
top
2
1
s1=[1, 2]
s2=[]
op=push(1); push(2)
Step 1 / 5
Step 1:
Push 1 then 2 into s1. Queue front is still at the bottom of s1.
Pointers: top=1
Focus: select @ [0, 1]
op="push(1); push(2)"