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.
I'm going to work on the random tests today. Thanks @Blind4Basics for the links provided. Cheers.
Thanks! Will refactor this asap.
You are right, thanks for your time
This comment is hidden because it contains spoiler information about the solution
Sure, in the first line I put:
seq.copy = seq
. After that I only use seq.copy on the rest of the code. There is something wrong in this?I made a copy of the input and only used the copy in the logic. Still the same result
In ruby, the random test expects 'nil' as results when the input has clearly one number which is odd times repeated.
Testing for [1, 14, 8, 8, 10, 1, 1, 6, 1, 14, 10, 4, 8, 1, 4, 16, 1, 16, 8]
It should work for random inputs too - Expected: nil, instead got: 6