i did some coding in java to find a missing number know my code is working. i have basic knowledge about how to check the complexity of the program and i have keen interest to learn about how can i do that please any one help me or suggest me to read some good tutorial. or help me to know somthing about asymptotic complexity related to my code. Thank You.
here is my code
Scanner s1=new Scanner(System.in);
System.out.println("Enter No:");
int length=s1.nextInt();
boolean isExit=false;
int []a=new int[length-1];
System.out.println("Enter all no");
for(int i=0;i<length-1;i++){
a[i]=s1.nextInt();
}
for (int i = 1; i<=length; i++) {
for (int j = 0; j < a.length; j++) {
if(i==a[j]){
isExit =true;
break;
}
}
if (!isExit) {
System.out.println(i);
//break;
}
isExit = false;
}
}
}