leetcode 232. Implement Queue using Stacks 用棧實現隊列(簡單)
一、題目大意 標籤: 棧和隊列 https://leetcode.cn/problems/implement-queue-using-stacks 請你僅使用兩個棧實現先入先出隊列。隊列應當支持一般隊列支持的所有操作(push、pop、peek、empty): 實現 MyQueue 類: void push(int x) 將元素 x 推到隊列的末尾 int pop() 從隊列的開頭移除並返回
昵称 iicode