摘要:
思路:双指针 class Solution: def exchange(self, nums: List[int]) -> List[int]: left,right = 0,len(nums)-1 while left<right: while left<right and nums[left]% 阅读全文
posted @ 2021-01-08 11:20
WangSJiNa
阅读(61)
评论(0)
推荐(0)
摘要:
借用字典来减少时间复杂度 class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: d = {} for i in range(len(nums)): find = target - nums[i] if 阅读全文
posted @ 2021-01-08 10:49
WangSJiNa
阅读(50)
评论(0)
推荐(0)

浙公网安备 33010602011771号