Leetcode # 65. Valid Number

https://leetcode.com/problems/valid-number Solution Time Complexity: O(len(s)) Space Complexity: O(1) (The input and output generally do not count towards the space complexity.) class Solution: def is ...

         続きを読む

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

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