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.
Change input to
&[u32]
, output tou32
Remove one fixed test (with extra large numbers)
The decription seems to be up to date somehow?
Change random vector generating mechanism
The description is shared between all languages, so "Hint: Do not modify the original array." shouldn't be removed. You can hide it with
Testing for overflows is questionable. The input range isn't specified in the kata, so I think the output type should be the same as the input type.
Passing by reference is good, but then a slice reference should be even better.
Yes, this problem can be solved without any use of the collection. Thanks for bug report. I believe it is fixed now.
I'm pretty sure this counts as cheesing the solution, but why not use what Rust gives me?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
With rounding involved, only recalculating the sweetness when sugar or water is added seems incorrect.
The provided sample tests do not fail when the sweetness would change due to rounding upon drinking, only the hidden test case.
This comment is hidden because it contains spoiler information about the solution