摘要:
题目描述: 提交:堆 class Solution: def minDifference(self, nums: List[int]) -> int: if len(nums) <= 4: return 0 minm = min(nums) maxm = max(nums) l1 = heapq.n 阅读全文
posted @ 2020-07-12 23:27
oldby
阅读(168)
评论(0)
推荐(0)
摘要:
题目描述: 方法一:二分 时间复杂度应该是O(n2) class Solution: def countSmaller(self, nums: List[int]) -> List[int]: num_length = len(nums) if not nums: return [] res = [ 阅读全文
posted @ 2020-07-12 22:29
oldby
阅读(134)
评论(0)
推荐(0)
摘要:
题目描述: 提交: class Solution: def rangeSum(self, nums: List[int], n: int, left: int, right: int) -> int: l = [] for i in range(n): for j in range(i+1,n+1) 阅读全文
posted @ 2020-07-12 11:23
oldby
阅读(117)
评论(0)
推荐(0)
摘要:
题目描述: 提交: class Solution: def reformatDate(self, date: str) -> str: l = date.split(" ") d = l[0][:-2] ml = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", 阅读全文
posted @ 2020-07-12 10:20
oldby
阅读(184)
评论(0)
推荐(0)
浙公网安备 33010602011771号