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.
sorry I mixed O(2n) with O(n^2)
Anyone know what the
*
here means? I tried running the code without it and it's a lot different.Is the time complexity of this solution O(n^2)? Is there a solution which is O(n) or O(1) and is also very clean?
This comment is hidden because it contains spoiler information about the solution