摘要:
class Solution: def peakIndexInMountainArray(self, A: List[int]) -> int: for i in range(1,len(A)-1): if A[i-1]A[i+1]: return i 阅读全文
摘要:
class Solution: def selfDividingNumbers(self, left: int, right: int) -> List[int]: ans = [] for i in range(left, right+1): if self.decide(i): ans.appen... 阅读全文
摘要:
class Solution: def minDeletionSize(self, A: List[str]) -> int: ans = 0 for j in range(len(A[0])): t = [] for a in A: t.append(a[j]) ... 阅读全文
摘要:
如果是'I'就加入当前最小的,是'D'就加入当前最大的. 阅读全文