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.
As far as I can see, all these answers are incorrect. The question asks us to produce a set of numbers that as nearly as possible add up to 100.0. To y knowledge, the only way to do this is to calculate percentages for all but one number, and then to calculate the last as 100-sum(others). Otherwise minor floating point inaccuracies will accumulate across all the answers.
Dave
I meant it was unclear what
h._one = 2
should do. Does it store ash[:one]
orh["one"]
?If you do update the tests, you should probably also update the description. It's not clear what kind of key h._one = 2 should use.
As for checking the type-I believe your comment is incorrect. There is nothing to check. :)
Agreed...
There's a bug in the first line—it should be
return(super) unless...
What does the cache buy in this context? Simply keeping the current and next value is enough, and doesn't incur the space overhead of an every increasing hash. Consider
fib.drop(1_000_000).take(1)
.Doesn't this always add an underscore?
Minor typo in the parameter name: sentence → sentence