LeetCode 41: First Missing Positive
Problem Restatement We are given an unsorted integer array nums . We need to return the smallest positive integer that does not appear in the array. The solution must run in O(n) time and use O(1) auxiliary space. Examples: nums = [1, 2, 0] The positive integers 1 and 2 are present, so the smallest missing positive integer is 3 . nums = [3, 4, -1, 1] The number 1...