Missing Smallest positive integer - Codility lesson4
def solution(A):
# write your code in Python 3.6
if max(A) <1:
return 1
k=max(A)+1
B=set(range(1,k))
#print(B)
C=B.difference(set(A))
#print(C)
if C:
if max(C)<=0:
return 1
else:
D=[]
for i in C:
if i>0:
D.append(i)
return min(D)
else:
return k
pass