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.
It works per the description of this kata. All arrays given are made up of the same number except for one entry. {1,1,1,2,3,3,3,3,3,3,3,1} wouldn't be given as an input.
it does not work correct. If we have {1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 1, 1} the answer is 2.0, your code will return 3.0
Chapeau
Based on the below conversations with the author, I guess you should shuffle (=randomize) the input array (a, b, c) for the tests, so that the solution has to sort them first.
Then I provided a translation to C++.
https://www.codewars.com/kumite/59535205f58e83b3db000081
Thanks.
thanks a lot for all the work you've done on this kata.
I'll try to make my katas better next time
No C++ translation is available, so issue is resolved.
can you please mark this as resolved :P, atleast until someone translates it to c++
thanks.
many of them are not in order.
ex:
[50, 19, 19], [44, 17, 15], [4, 54, 5], [33, 11, 24], [69, 11, 15], [77, 12, 27], [35, 39, 13], [90, 44, 18], [31, 8,22], [22, 30, 7], [94, 16, 25], [84, 37, 18], [84, 19, 23], [9, 45, 21], [61, 18, 9], [93, 50, 25], [10, 21, 17], [65, 26, 3], [39, 31, 6] ]
as for the description, it says
Note: c will always be the largest value in the array, whereas a and b can be either of the 2 remaining values.
Further ex. arrays (from python):
In sorted order.
And yes, I mean to pass e.g.
[3, 5, 4]
instead of[3, 4, 5]
. But then the java version should be also updated, along with the description that currently says:Cheers
ex arrays:
[69, 11, 15], [77, 12, 27],[12, 16, 20]
what do you mean by random order. do you mean that the a,b, and c in the array are in order from smallest to largest?
If this is what you mean, then yes, it is in a random order.
The python version can be easily updated to provide the integers in random order (just shuffle the array before passing it on).
I can't help with java, unfortunately (but it looks messy, too...)
I'll try to. Although I don't understand why a c++ variant was automatically included, since I didn't ask the webite to.
In fact I don't even use c++ >.>
the numbers were in random order when I wrote the kata, but someone edited it out.
I have now updated the instructions.
Loading more items...