Given an unsorted integer array, find the smallest missing positive integer.The solution involves iterating through the array, swapping elements to their correct positions based on their values.After swapping, iterate through the array again to find the smallest index that is not equal to its value.Return the smallest missing positive integer.