Data Structures & Algorithms
237 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Find All Numbers Disappeared in an Arrayhistorical
LeetCode notes on finding all disappeared numbers in an array.
- Big Number Additionhistorical
Add large numbers represented as strings by scanning from right to left and carrying.
- Longest Valid Parentheseshistorical
Use a stack to mark matched parentheses, then count the longest consecutive valid interval.
- Remove Invalid Parentheseshistorical
Enumerate whether to keep or remove each character, then keep the longest valid-parentheses results.
- Generate Parentheseshistorical
Generate parentheses using full enumeration with a stack, and pruning based on remaining left/right parentheses.
- Valid Parentheseshistorical
Validate a parentheses sequence using a stack or repeated string replacement.