DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
5+9 =
Submit