} --Now, among does not depend of input.length and it will never do in any application. That is the sole reason I say it's O(1).
The application is of course O(n).
} --Now, among does not depend of input.length and it will never do in any application. That is the sole reason I say it's O(1).
The application is of course O(n).