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. The classic approach uses in-place index-based placement (place value v at index v-1) and then scans for the first index where arr[i] != i+1 to identify the missing positive integer.
Asked at:
Lyft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid May, 2026
Lyft
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.