摘要:
参考:https://leetcode.com/problems/numbers-with-repeated-digits/discuss/256866/Python-O(logN)-solution-with-clear-explanation 以下分析过程是我自己的思路,和上面的代码思路不太一样 阅读全文
摘要:
1 class Solution: 2 def shipWithinDays(self, weights: 'List[int]', D: int) -> int: 3 left = max(weights)#不能小于最重的单个货物 4 right = sum(weights)#不用大于全部货物的总重量 5 while left ... 阅读全文
摘要:
下面这个是简写: 阅读全文
摘要:
1 class Solution: 2 def bitwiseComplement(self, N: int) -> int: 3 if N==0: 4 return 1 5 elif N==1: 6 return 0 7 8 s = list() 9 wh... 阅读全文