Author: basketwang
-
166. Fraction to Recurring Decimal
Tag: Math Key Point: Note how to identify repeating number Solution:
-
164. Maximum Gap
https://leetcode.com/problems/maximum-gap/description/ Tag: Array/List Key Points: Solution: Iterate by the number instead of array index Solution: Pigeonhole Principle
-
163. Missing Ranges
https://leetcode.com/problems/missing-ranges/ Tag: Array/List, recursion Key Points: Solution: Linear Scan Solution: Recursion When thinking of the recursion, always focus on the base case and logic for current recursive call and assuming it has been able to handle the next recursive call. Don’t be trapped by over-thinking into multi-level recursive calls. For this question, First step, we…
-
162. Find Peak Element
https://leetcode.com/problems/find-peak-element/description/ Tag: Array/List, Binary Search Key Points: Solution:
-
161. One Edit Distance
https://leetcode.com/problems/one-edit-distance/description/ Tag: String Key Points: Solution
-
159. Longest Substring with At Most Two Distinct Characters
https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/description/ Tag: Array/List, Sliding Window Key Points: Solution: