31. First Missing Positive
Return the smallest positive integer missing from an unsorted array in O(n) time and O(1) extra space.
Example 1:
Input: nums = [1,2,0] Output: 3
Example 2:
Input: nums = [3,4,-1,1] Output: 2
Constraints:
1 <= nums.length <= 10^5