returns the smallest positive integer python

Solutions on MaxInterview for returns the smallest positive integer python by the best coders in the world

showing results for - "returns the smallest positive integer python"
Juan Sebastián
23 Jan 2018
1def minpositive(a):
2    A = set(a)
3    ans = 1
4    while ans in A:
5       ans += 1
6    return ans
7