Your question is Smallest Missing Positive Integer. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an array A of N integers, find the smallest positive integer greater than 0 that does not occur in A.
Implement def missing_positive(A):. Return the missing integer. The array may contain negative values, zero, duplicates, and values larger than N.
def missing_positive(A):