Stack and Queue - cocoder39/coco39_LC GitHub Wiki
Monotonically Increasing Stack (appending 0 to original array to purge stack) https://leetcode.com/tag/monotonic-stack/
- 84. Largest Rectangle in Histogram
- 85. Maximal Rectangle
- 1727. Largest Submatrix With Rearrangements
- 1856. Maximum Subarray Min Product
- 42. Trapping Rain Water
- 739. Daily Temperatures
- 239. Sliding Window Maximum
- 907. Sum of Subarray Minimums
- 1762. Buildings With an Ocean View
stack
- 636. Exclusive Time of Functions
- 1209. Remove All Adjacent Duplicates in String II
- 921. Minimum Add to Make Parentheses Valid
- 1249. Minimum Remove to Make Valid Parentheses
- 735. Asteroid Collision
- 1472. Design Browser History
- 1047. Remove All Adjacent Duplicates In String
Using stack to parse expression (logical & maintainable)
Parser