How would you find the smallest missing number from an array of numbers?
Implement the function below to return the smallest missing positive integer. The input array may contain duplicates, zero, and negative values. Modify the array in place if useful.
Input: An array of integers nums.
Output: The smallest positive integer not present in nums.
def smallest_missing_positive(nums):