Given an unsorted integer array nums, return the smallest missing positive integer. Must run in O(n) time and O(1) extra space.
Input: Integer array nums.
Output: Integer — smallest positive integer not in nums.
Input: [1,2,0]
Output: 3
Explanation: 1 and 2 present. Missing: 3.Input: [3,4,-1,1]
Output: 2
Explanation: 1 present, 2 missing.Input: [7,8,9,11,12]
Output: 1
Explanation: 1 is missing.1<=nums.length<=10^5-2^31<=nums[i]<=2^31-1