argmax, argmin

\begin{align} \mathop{argmax \ }_{x \in S}{f(x)}:=\{ x \in S:f(s) \leq f(x), \ \forall s \in S \} \\ \mathop{argmin \ }_{x \in S}{f(x)}:=\{ x \in S:f(s) \geq f(x), \ \forall s \in S \}  \end{align} Re ...

         続きを読む

[Python] any(), all()

any(iterable): Return True if any element of an iterable is True all(iterable): Return True if all element of an iterable is True 範例 Leetcode # 1275. Find Winner on a Tic Tac Toe Game

         続きを読む

肉燥飯

五花肉肥肉切丁 下鍋小火煸油 (香味來自豬油,相當重要) 醬油 五香粉 紅蔥頭 加剛剛的豬油開始滷肉燥

         続きを読む

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: ...

         続きを読む

Leetcode # 13. Roman to Integer

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 ...

         続きを読む

Leetcode # 283. Move Zeroes

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 ...

         続きを読む
1 ... 29 ... 52
Bitnami