For this Question: Given an array of N integers, your task is to find the smallest positive number which is not present in the given array.First line of input contains a single integer N, next line contains N space separated integers depicting the values of array.

Constraints:- 
1 < = N < = 1000000
-10^6 < = Arr[i] < = 10^6Print the smallest positive integer not present in the given array.Sample Input:-
5
-2 1 0 4 5

Sample Output:-
2

Sample Output:-
4
-1 1 2 3

Sample Output:-
4, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException {
        BufferedReader br= new BufferedReader(new InputStreamReader(System.in));

		int n= Integer.parseInt(br.readLine());
		StringTokenizer st=new StringTokenizer(br.readLine());
		int[] arr = new int[1000001];
		int res=-1;

		int max= Integer.MIN_VALUE;
		for(int i=0;i<n;i++){
			int val=Integer.parseInt(st.nextToken());
			if(val>0)
				arr[val] = 1;

			if(val > max){
               max= val;
			}

		}

		for(int i=1;i<=1000000;i++){
			if(arr[i]==0){
                res=i;
				break;
			}
		}
		if(res==-1){
			res= max+1;
		}
		System.out.println(res);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?