leetcode20200423每日一题-面试题56 - I. 数组中数字出现的次数
1.题目2.题目意思数组中的数字都是成对的,有两个数除外。找出这两个。另外注意时间复杂度O(n),空间复杂度O(1)。太苛刻了!3.代码class Solution: def singleNumbers(self, nums: List[int]) -> List[int]: ret, index = 0, 0 # step1 找出两个数做异...
原创
2020-04-28 14:45:53 ·
142 阅读 ·
0 评论