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.
what the
It is really hard way to solve, but I respect it.
Because eventually you did it.
I like the algo.
Sorry, can you explain me how this works behind the scenes?
toBinary(9) is 1001. And your code computes this correctly as 1001. However I don't understand where this string[0] '1' is being taken from?
9-16 is NOT >=0. Hence codition should fail and binary string should get '0' as its first digit. But it still gets '1' somehow.
Can you explain this to me please?