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 think this does not work for words ending with longest chain, e.g. "sequoia". Tests do not cover these cases.
Quite funny it is legal :)
What?
Rust gives warning for c is not used.
This comment is hidden because it contains spoiler information about the solution
what?
@username0 Yes, then your solution is more elegant beeing in functional style.
@x0r19x91 maybe if you implement the sqrt function manually, but these days modern x86 CPUs have a specialized instruction for this function. I suppose it is much faster. However, we should benchmark that to be sure, it is interesting topic.
Why would it fail on non-ascii names?
return keywords can be omitted
why clone?
Using exceptions for flow control is not considered as "best practices". :)
This is very slow I assume.
Bogo sort? :)
What about this input string: "4.7 ohms"?
Do you think the use of
take_while
is faster than calculation of the square root of x?