If I use a loop to perform constant-time operations (say, counting the number of times the value of the first element of the array is greater than the value of the last) over a permutation on an array of size n, but limit the number of iterations of the loop to a constant, does that make the big-O time complexity of my loop O(1)?
I have a feeling the answer is "yes" here, but would like to confirm.
More specifically, I'm using Python's itertools.permutations over an array. To limit the total time processing the permutations, I break out of the loop after a constant number of iterations of the loop if it hasn't completed on its own.