
[leetcode-232] Implement Queue using Stacks
ยท
๐ข One step
LeetCode-232 Implement Queue using Stacks : 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). note : sub์ ์
์ ์ถ :::python class MyQueue: def init(self): self.temp = collections.deque() def push(self, x: int) -> None: self.temp.append(x) def pop(self) -> int: return self.temp.pople..