##限定时间复杂度O(n)num=[0,5,3,1,2,-2,4,8,5,6]num=set(num)d=1for i in range(1,len(num)+1): if d in num: d+=1 else: breakprint(d)
leetcode python 041首个缺失正数
原文:https://www.cnblogs.com/offline-ant/p/9535833.html