题解 | #缺失数字#
缺失数字
http://www.nowcoder.com/practice/9ce534c8132b4e189fd3130519420cde
class Solution:
def solve(self , a ):
m = len(a)
for i in range(m+1):
if i<m and i != a[i]:
return i
if i==m and i != a[:-1]:
return m