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.
The duplicate kata has been retired.
Either way you'd have to loop through all digits, and
Counter
has at most ten keys.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I don't think it can be done in
O(n)
. Your own solution isn't either, it'sO(n^2)
just like this one. I think it can be done inO(n log n)
orO(n*w)
( where w = bit width of n ), but no better.People will vote lots of bad oneliners Clever and even Best Practice.
(!!)
indeed is a bad idea here, as it is almost always.Fixed.
Yep, full duplicate, I only pasted my solution with an extra '-s' for the function name and got it like clockwork...
Done. Is it good?
Random prediction
Yes, I was going to ask people that
Do you know how I could make them?
It is. A fix is available, but has to be approved by Raul.