Leetcode # 209. Minimum Size Subarray Sum
https://leetcode.com/problems/minimum-size-subarray-sum Solution: Sliding Window Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally do not count towards the space com ...
https://leetcode.com/problems/minimum-size-subarray-sum Solution: Sliding Window Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally do not count towards the space com ...
https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii My Solution Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally do not count towards the space com ...
https://leetcode.com/problems/remove-duplicates-from-sorted-array Solution 重點:nums sorted in non-decreasing order Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally d ...
In-Place Algorithm In computer science, an in-place algorithm is an algorithm that operates directly on the input data structure without requiring extra space proportional to the input size. In other ...
https://leetcode.com/problems/longest-substring-without-repeating-characters Solution: Sliding Window Time Complexity: O(len(s)) Space Complexity: O(26) = O(1) (26 lowercase letters) (The input and ou ...
Two Pointers 收縮型 One Input, Opposite Ends (相反的兩端:[left → … ← right]) left 和 right 兩個 pointer 為 opposite ends (相反的兩端;起始於起點和終點,並越來越靠近) Template def fn(arr): ans = 0 left, right = 0, len(arr) - 1 w ...
https://leetcode.com/problems/longest-repeating-character-replacement Solution: Sliding Window Time Complexity: O(len(s)) Space Complexity: O(len(s)) (The input and output generally do not count towar ...
https://leetcode.com/problems/letter-combinations-of-a-phone-number Solution n = len(digits) Time Complexity: O(4 * (4 ** 2) * (4 ** 3) * … * (4 ** n)) = O((4 ** n) * n) Space Complexity: O(n) ( ...
発音記号:「I 和 i」「U 和 u」的差別 I U (ʊ) 嘴型較為放鬆 it, pick influence i u 短而急促 happy, money put, book Ref WIKIPEDIA: 発音記号 米山 明日香 (2021). 英語「発音記号」の鬼50講. WIKIPEDIA: Vowel
https://leetcode.com/problems/minimum-costs-using-the-train-line Solution n := len(regular) == len(express) prev[0/1] := 前一站為止留在 regular/express 車廂上的最小 cost Time Complexity: O(n) Space Complexity: O(1 ...