Mental Model
A stack works like a pile where you add and remove from the top. A queue works like a line where you add at the end and remove from the front. To make a stack using a queue, we reorder the queue so the newest item is always at the front.
Analogy: Imagine a line of people where the last person to join wants to be served first. To do this, after a new person joins at the end, everyone in front moves behind them so the new person is now at the front of the line.
Queue: front -> [1] -> 2 -> 3 -> null Stack top is the front of the queue ā
