My professor gave this example in a lecture:
Example: Given an integer N, print out the values 1…N.
for (int i=1; i<=N; i=i+1) { System.out.print(i); }
The professor said that the loop was O(n) because it printed the values 1 to N. However I thought that Big O Notation was a reference to the amount of items in the input data therefore it would be O(1) (which is technically equivalent to O(n) as the input size is 1) due to it only accessing a single data item once.
Am I right in thinking this?