Skip to content

Latest commit

 

History

History
149 lines (126 loc) · 9.53 KB

File metadata and controls

149 lines (126 loc) · 9.53 KB

General Applications

Problem Difficulty Note
844. Backspace String Compare Easy (1227)
155. Min Stack Easy Two stacks for O(1) min.
232. Implement Queue using Stacks Easy Flush only when pop is called.
225. Implement Stack using Queues Easy Rotation trick to maintain top.
**1472. Design Browser History Medium (1453) Doubly linked list.
946. Validate Stack Sequences Medium (1461) Be able to pop when peek matches the popped array.
71. Simplify Path Medium Handle . and .. and other cases.
636. Exclusive Time of Functions Medium A -> B, A lends time to B. A.time -= B.time
**895. Maximum Frequency Stack Hard (2027) Bucket of stacks or heap with (freq, index) as state.

Nested Structure

Problem Difficulty Note
150. Evaluate Reverse Polish Notation Medium
1190. Reverse Substrings Between Each Pair of Parentheses Medium (1485)
**856. Score of Parentheses Medium (1562)
**341. Flatten Nested List Iterator Medium
394. Decode String Medium Multi-digit[xyz] patterns.
**1106. Parsing A Boolean Expression Hard (1880) Recursion.
726. Number of Atoms Hard Merge counts when pop.
**227. Basic Calculator II Medium How to handle - at first and flush the last number.
**224. Basic Calculator Hard

Parentheses

Problem Difficulty Note
20. Valid Parentheses Easy
1614. Maximum Nesting Depth of the Parentheses Easy (1322)
1021. Remove Outermost Parentheses Easy (1311)
**921. Minimum Add to Make Parentheses Valid Medium (1242)
1249. Minimum Remove to Make Valid Parentheses Medium (1657)
**1541. Minimum Insertions to Balance a Parentheses String Medium (1759) Check 2 )), then 1 (.
**678. Valid Parenthesis String Medium (1700) Greedy range [min,max].
**1963. Minimum Number of Swaps to Make the String Balanced Medium (1688)

Remove Adjacent Items

Problem Difficulty
735. Asteroid Collision Medium
1047. Remove All Adjacent Duplicates In String Easy (1286)

Monotonic Stack

Basic

Problem Difficulty
739. Daily Temperatures Medium
496. Next Greater Element I Easy
503. Next Greater Element II Medium
901. Online Stock Span Medium (1709)

Advanced (Optional)

Problem Difficulty

Rectangle

Problem Difficulty
42. Trapping Rain Water Hard
3676. Count Bowl Subarrays Medium
84. Largest Rectangle in Histogram Hard
85. Maximal Rectangle Hard

Contributions

Problem Difficulty
907. Sum of Subarray Minimums Medium (1976)
2104. Sum of Subarray Ranges Medium (2000)

Lexicographical

Problem Difficulty
402. Remove K Digits Medium (1800)
316. Remove Duplicate Letters Medium (2184?)

Queue Basics

Problem Difficulty
622. Design Circular Queue Medium
1823. Find the Winner of the Circular Game Medium
641. Design Circular Deque Medium

Monotonic Queue

Problem Difficulty
239. Sliding Window Maximum Hard

Explanation

TODO: Add more explanation videos for monotonous stack.