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.
I'm just learning, but it seems to me that my last solution has O (1) complexity. Or am I wrong ?
This comment is hidden because it contains spoiler information about the solution
why is this O(logN)? Can someone explain this to me???
Is there actually an O(1) solution? I'm curious to know if there's one.
It's not O(n), it's O(logN).