Category: Leetcode
-
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: