Amazon Interview Question

find the next missing positive number in a unsorted array in O(n)