题解 | #数组中出现次数超过一半的数字#
缺失数字
http://www.nowcoder.com/practice/9ce534c8132b4e189fd3130519420cde
class Solution: def solve(self , a): # write code here i = 0 while (i<len(a)): if a[i] != i: return i if i==len(a)-1: return i+1 i+=1
缺失数字
http://www.nowcoder.com/practice/9ce534c8132b4e189fd3130519420cde
class Solution: def solve(self , a): # write code here i = 0 while (i<len(a)): if a[i] != i: return i if i==len(a)-1: return i+1 i+=1
相关推荐