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.
This comment is hidden because it contains spoiler information about the solution
Kinda defeats the purpose of doing the kata, doesn't it?
This comment is hidden because it contains spoiler information about the solution
This answer does not even consider trailing spaces. We need better test cases.
This is wrong; the spec clearly says not to use the built in functions.
Hi Kursulia. Thanks for your reply! Interesting to read your solution because I did not know about Fisher-Yates. Nice solution. Personally I think that maybe unit tests are stronger when it does exclude the random factor. My Bingo Number Caller kata is a good example. There I use dependency injection to pass the Random object. That makes it possible to pass a stub instead of the Random object.
Hi, FrankK! Thanx a lot for you attention to my solution. U R right, but I was wondered when I have recieved your comment and I
ve tried to submit this solution again. As you already know the EachNumberOnCardIsUnique() test was failed for 34 times (but the 35-th wasn
t,LOL). When I tested my solution for the first time, I saw the green-colored frame and just clicked "Final Submit" without any attention to tests. (I really pretty lucky person!)So random in .NET isn't random enough, you know and it can`t solve the unique numbers problem. But the shuffle can! (The Fisher–Yates algorithm). So link to my new solution: http://www.codewars.com/kata/reviews/566d5e980bdf235503000023/groups/57558befbe106bc9820006e7
Hi Kursulia,
Thanks, you showed me some language features in VS2015 I did not know of yet!
Your code is very short and that draw my attention, but when I had a closer look I could also see why: your solution is incorrect because the numbers on your card are not unique. I wonder though how you have been able to submit because the unit tests should have told you.
I did some testing on your solution and, as expected, the EachNumberOnCardIsUnique() test fails. Just as the RandomnessTest().
Can you tell me more about it?