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.
yay proper unit tests
since we're just returning true/false from each method, we can just return the conditional
Let's not override the thing that we're testing
the
flatten
method is overridden for the tests, so this solution doesn't work at allCleaned up the sorta cryptic variable names. Readable names trump sort names.
This is nice, but there is a lot of wasted cycles sorting and recalculating
Linq is a great framework for dealing with sets and lists, but often people use it as a fix everything and not really understand what is happening under the hood. For simple things, in my honest opinion, it's better to go with a pure C# solution instead of Linq to help increase the efficiency of the code. For complex things, then it's better to bring in Linq.
There we go, a solution without using Linq
I'm somewhat new to ruby so I didn't know how to pass a set of numbers. The other thing is that for the array test, as the length of numbers increases, the speed of the test decreases exponetally.
Two submission tests failed with contraditory reasons.
dice(6,6) should always return 6
dice(6,6) should always return 0
This comment is hidden because it contains spoiler information about the solution
It's still very neat.
I did not know of that operator, and it looks quite useful.
How effecent is it?