Daily coding challenge #3

Daily Coding Challenge #3

Question:
Given an array of integers, find the first missing positive integer in
linear time and constant space. In other words, find the lowest positive
integer that does not exist in the array. The array can contain duplicates
and negative numbers as well.

For example:
The input [1, 2, 0] should give 3.
You can modify the input array in-place.

Program:

Daily coding challenge 3



Output:
Daily coding challenge answer 3

Reference:
dailycodingproblem

Comments