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 used "list" because I find that to be a bit less specific than "array" but I don't mind one way or another, I read them all in a language neutral manner.
@natan: sorry I have just made the change of "array" to "collection" following Bandit254. Do you agree with that?
Thanks for your proposal!
PS:
I agree with that all the more that the difficulty could be different from one langauge to another one.
I made an attempt at cutting things down a bit.
I'd ideally want complete neutrality but I understand that not all languages express input/output well in their types and that not everyone is so quick to look at the sample tests. Still, I think this is a fair bit less redundant without losing much. Obviously, having multiple versions by language is bad.
Can you translate this drawing into an algorithm?
You will be given two dimensions
length
width
You will return a list or a string depending on the language.
When the initial parameters are so that
length == width
, the solution[length]
would be the most obvious but not in the spirit of this kata so, in that case, returnNone
/Nothing
/nil
/null
/{}
/Array()
or in the case of C, its sz component should equal 0.length == width
as a starting case would be an entirely different problem and the drawing is planned to be interpreted withlength != width
. (See kata, Square into Squares. Protect trees! http://www.codewars.com/kata/54eb33e5bc1a25440d000891 for this problem).@Bandit254: I modified the tests so there are no more a difference between the "Solution" and the tests in C#.
It seems that more than 18,000 people understood that "array" here was a generic term. Moreover the examples show that it can refer to different structures depending on the language.
What do you propose to remove that "cruft"?
The kata description uses the word "array", but it isn't referring to any particular data structure in any particular language so you shouldn't interpret it as such.
I'd want to see the language specific cruft cleared out of the description because it's drowning out the description itself.
Example tests are OK, and task is not about creating an exact reverse of input. Please read task description carefully, especially examples.
Resolving as not a kata issue.