https://leetcode.com/discuss/general-discussion/786126/python-powerful-ultimate-binary-search-template-solved-many-problems
-
- Count Good Nodes in Binary Tree
-
- Longest Substring Without Repeating Characters
-
- ZigZag Conversion
-
- Group Anagrams
-
- Longest Happy String
-
- Minimum Deletions to Make Character Frequencies Unique
-
- Equal Sum Arrays With Minimum Number of Operations
-
- LRU Cache
-
- Add Two Numbers
-
- Add Two Numbers
-
- ZigZag Conversion #坐标转换。
-
- Group Anagrams 转换为素数乘法
-
- Multiply Strings 字符乘法
-
- 排列2
-
- Reverse Words in a String
-
- Minimum Deletions to Make Character Frequencies Unique 使用了堆栈的数据结构。
-
- Decode String 使用了堆栈的数据结果
-
- Reverse Words in a String
-
- Equal Sum Arrays With Minimum Number of Operations 在两个数组上的双指针。
-
- Longest Substring Without Repeating Characters
-
- 3Sum
-
- Search in Rotated Sorted Array
-
- String Compression 【do while 结构】
-
- Trapping Rain Water
-
- Container With Most Water
-
- Minimum Deletions to Make Character Frequencies Unique 使用了堆栈的数据结构。
-
- Reverse Words in a String
-
- Number of Islands
-
- Letter Combinations of a Phone Number
-
- Decode String
-
- Count Good Nodes in Binary Tree
-
- Number of Islands
-
- Letter Combinations of a Phone Number
-
- Word Search
-
- Count Good Nodes in Binary Tree
- 207
-
- Design In-Memory File System 主要是处理root中/ 和split(/),路径数组跳过""的问题。
-
- Equal Sum Arrays With Minimum Number of Operations 有启发,根据答案修正的bug
-
- Insert Delete GetRandom O(1)
-
- Search in Rotated Sorted Array
-
- Find the Duplicate Number 二分搜索
-
- Reverse Integer 注意边界推导过程
-
- Median of Two Sorted Arrays
-
- Longest Valid Parentheses
-
- Equal Sum Arrays With Minimum Number of Operations
-
- Insert Delete GetRandom O(1) 解决方案可以一看,删除方案可以一看。
-
- 3Sum
-
- Search in Rotated Sorted Array
-
- Word Search
-
- Find the Duplicate Number 二分搜索
-
- Search a 2D Matrix II 从左下角开始搜索。
-
- Median of Two Sorted Arrays 二分搜索
- 875 吃香蕉,二分搜索
-
- Longest Palindromic Substring.py
-
- Min Stack
-
- Maximal Network Rank
-
- Min Stack
-
- Find the Duplicate Number # 二级索引。
-
- Trapping Rain Water [独自完成]
-
- Median of Two Sorted Arrays
-
- First Missing Positive
-
- Longest Valid Parentheses
-
- Combination Sum
-
- Generate Parentheses
- 523 questionbank/523. 连续的子数组和.py # 前缀和