Search
⌘K

Leetcode 41. First Missing Positive

Find the smallest positive integer missing from an unsorted array while meeting O(n) time and O(1) extra space; typically solved by in-place index-based placement (place value v at index v-1) and scanning for the first index that doesn’t match.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.