[LeetCode] 232. Implement Queue using Stacks - 문제풀이
Description Stack 자료구조를 이용하여 선입선출(First In First Out) 구조의 Queue를 구현하는 문제입니다. Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty). Implement the MyQueue class: void push(int x) Pushes element x to the back of the queue. int pop() Removes the element from the front of the queue and ..