Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

returns the smallest positive integer python

def minpositive(a):
    A = set(a)
    ans = 1
    while ans in A:
       ans += 1
    return ans
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #returns #smallest #positive #integer #python
ADD COMMENT
Topic
Name
5+9 =