queue
-
Summary of Queue & Stack Problem-Solving Methods
Related LeetCode problems (easy): 155, 225, 232, 346. Common methods: Stack: push(), pop(), peak(), empty(); Queue (LinkedList)...
-
346. Moving Average from Data Stream
Given a stream of integers and a window size, calculate the moving average of all integers in the sl…
-
155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. pu…
-
225. Implement Stack using Queues
Implement the following operations of a stack using queues. push(x) — Push element x onto stac…
-
232. Implement Queue using Stacks
Implement the following operations of a queue using stacks. push(x) — Push element x to the ba…