Leetcode # 146. LRU Cache
https://leetcode.com/problems/lru-cache Solution Time Complexity: O(capacity) Space Complexity: O(capacity) (The input and output generally do not count towards the space complexity.) class LRUCache: ...
https://leetcode.com/problems/lru-cache Solution Time Complexity: O(capacity) Space Complexity: O(capacity) (The input and output generally do not count towards the space complexity.) class LRUCache: ...
https://leetcode.com/problems/roman-to-integer Solution Time Complexity: O(len(s)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution: de ...
https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence Solution Time Complexity: O(n) Space Complexity: O(n) (The input and output generally do not count towards the space complex ...
https://leetcode.com/problems/move-zeroes Solution Time Complexity: O(len(nums)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution: def ...
The Viola–Jones object detection framework is a machine learning object detection framework proposed in 2001 by Paul Viola and Michael Jones. It was motivated primarily by the problem of face detectio ...
Google Style def method(arg1[: type1][, arg2[: type2], ...])[ -> return_type]: """A one-line summary. An overall description, it may also contain a brief description and/or usage examples. A ...
Definition \begin{align} & a \ \% \ n = r \\ & \text{或 } a \text{ mod } n = r \\\\ & \equiv a = nq + r; \quad q, r \in \mathbb{Z} \quad |r| < |n| \end{align} 同餘關係 Congruence Relation \ ...
Problem n := len(s) Check 「∃ s’ = s[i:n], 0 < i < n s.t. s == s’ * k, k >= 2」 https://leetcode.com/problems/repeated-substring-pattern/ First Solution Time Complexity: O(len(s) * ...
https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/ First Solution Time Complexity: O(len(haystack) + len(needle)) Space Complexity: O(len(haystack)) (The input and outpu ...