Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
ranks can't be changed
Thanks!
This comment is hidden because it contains spoiler information about the solution
Well, not exactly O(n); but it's the same (technically, it is O(n) in average, it is not strictly O(n) because the numbers are not in order). How could this be O(n)? This would mean the result is returned after a constant number of operations, independent of the input. Obviously it is not. How many operations for n = 0, for n = 9? Each comparison is an operation.
THis is O(n).