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.
Peformance tag should be added , i solved it but i got timeout error because my solution is O(n) ,
i should find another way to solve it and hate this really because im still beginner and i did not know its need a solution O(log n) :(
The description of the second function does not make much sense to me, am I missing something? How can
n=0
(which you even test) if the argument to the functionf
is{1,...,n}
and1 <= x <= n
? This seems paradoxical to me.