Use the array itself as a boolean flag system. For each number you encounter, mark index by negating the value there. After processing, positive values indicate missing numbers.
When you see nums[i], compute index = abs(nums[i]) - 1. Then set nums[index] = -abs(nums[index]). The absolute value handles cases where the value is already negative.
After marking, iterate through the array. If nums[i] > 0, then is missing. This boolean check (positive vs. negative) tracks presence without extra space.