Description
Given an unsorted integer array, find the smallest missing positive integer.
Example 1:
1 | Input: [1,2,0] |
Example 2:
1 | Input: [3,4,-1,1] |
Example 3:
1 | Input: [7,8,9,11,12] |
Note:
Your algorithm should run in O(n) time and uses constant extra space.