Related problems on LeetCode (easy)
155, 225, 232, 346
Common methods
- Stack: push(), pop(), peak(), empty()
- Queue(LinkedList): add(), element(), peak(), poll()
This siteOriginal articleAll follow "Attribution-NonCommercial-ShareAlike 4.0 License (CC BY-NC-SA 4.0)Please retain the following annotations when sharing or adapting:
Original author:Jake Tao,source:Summary of Queue & Stack Problem-Solving Methods