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.
thx a lot for your reply, the current impl via passing a string only because that ruby cannot denote identical syntax as perl6 does, but your suggestion is very reasonable, i will modify the kata to make it more pragmatic when i'm free.
Thank you for your feedback. In fact, there are similar test cases, but it looks a bit complex, I replaced with what you mentioned.
Thank you for your feedback. I understand that the current design might not meet your expectations. The intention of this kata is to explore the concept of emulating Perl 6's whatever expression in Ruby, rather than focusing on parsing syntax extensively, so I made some simplications.
I also wanted to use Ruby's internal DSL to design this kata, but doing so would deviate from the syntax of Perl 6.
But your design based on
varargs
&block
is the most concise one undoubtedly. What do you think is the most suitable difficulty for this kata?Hi, thanks for your reminder, a cloned argument is passed in after making modification!
This comment is hidden because it contains spoiler information about the solution
The precondition of enjoying fairness is that owning corresponding rights. In the case of weight equals 0, minimum condition is not satisfied, it looks like no sense but indeed logical. The target of the algorithm is to minimize the variance of the shares meanwhile tending to distbute the bigger cake to those less profitable people. The strategy for distbuting does not aim to the absolute but overall & reasonable fairness.^‿^
I added a example & explanation in description, and hope that you can understand what i wanna express.^_^
Thank you for reminding me, i have removed it from description.
Thanks for your advise, and it have been removed.
Approved!
This comment is hidden because it contains spoiler information about the solution
Ruby translation kumited please approved!
You should add more tests with (very){100} large numbers!!!
After submitted I got such error message:
But I have tried to test all the tests in my local machine, I got the expected results instead of
nil
.You should return a string instead of printing it to the console ^_^.
Loading more items...