Missing positive number

1.5

2 votes
Problem

You are given an array arr[] of N integers including 0. The task is to find the smallest positive number missing from the array.

Sample Input
5
1 2 3 4 5
Sample Output
6
Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?