public static void printArray(int n) {
for(int i = 0;i <=Integer.MAX_VALUE;i++) {
if(i == n)
break;
System.out.print(i+" ");
}
}
What should be the time complexity of the program?
>Solution :
O(N) because it is a single for loop, with the time spent running completely dependent on the N argument value