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.
Description should be language-agnostic
Example tests on same data entry user with different scores should be added
People usually don't rewrite kata out of the blue.
I can see that this is ruby-exclusive kata.
Why array of arrays? This was perfect opportunity for hashes :(
Tests clarified.
Fixed
Please, add a couple example tests and random tests.
No test cases.
Instructions need clarification about the fields in the arrays.
The instructions on how the comparison should behave when grades are the same could be clearer.
Ideas:
You could specify: "if the same student has multiple scores saved, keep only the highest score" or some such.
"Why should I favour [1,2] over [1,3]."
Definitely agree here. There is no way to know which score should be stored for student 1 (when integers are used as names instead of strings). Please fix this. Otherwise a great little kata.
Description fails to prepare users for numerical usernames or for being passed duplicate usernames with marks that don't match. Why should I favour [1,2] over [1,3].
Why should
dataclean([['a',5],['b',3],['a',5]])
be [['b',3],['a',5]] whiledataclean([['a',2],['b',3],['a',2]])
returns [['a',2],['b',3]] in a different order?Can you add a description of the user entries. There needs to be something about the last element of a user entry being the score, and, I believe, all other elements in a user entry describe the user (say, by name or ID).
For formatting the example, I think wrapping it with triple ticks and including "ruby" right after the first triplet (see http://www.codewars.com/docs/description-markdown-field for examples) will do what you want:
Thanks. I have made these changes.
How do I format the Example?
The following points need to be addressed in the description:
values
argument. It seems to be an array of arrays, but may also benil
. Furthermore, it seems each array in the argument contains positive integers (although the examples given in the description have a string for the name/ID and an integer for the score) and is such that the first element is the student's name/ID and the last element is the score; for example, [[1,2,3],[2,1,4]] contains two students with the names/IDs of1
and2
and the corresponding scores of3
and4
(the middle element(s) may be ignored).nil
if the argument isnil
. Are there any other cases wherenil
should be returned? If the argument is an empty array, then an empty array should be returned, correct?