[NineChap 8] High Frequency Questions - Shuatiblog.com
Number & Bit questions
- Single Number
- Single Number II
- Single Number III
- Single Number IV
- Majority Number
- Majority Number II
- Majority Number III
Subarray questions
Always using the idea of 前缀和.
- Best Time to Buy and Sell Stock – 贪心法
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Maximum Subarray
- Minimum Subarray
- Maximum Subarray II
- Subarray with 0 Sum
- Subarray with Particular Sum
- Subarray with Sum Closest
N Sum questions
- Two Sum – difficult
- 3 Sum
- 3 Sum Closest
- 4 Sum – doing a O(n3) solution is good enough.
- k sum questions are basically solved with O(nk-1) time. Faster solution is available but too complex.
L 家最爱
Additional questions
Read full article from [NineChap 8] High Frequency Questions - Shuatiblog.com
No comments:
Post a Comment