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.
Clever use of the Set equals method.
Here is a TypeScript translation for review: https://www.codewars.com/kumite/61ae28da87f3400033383e2f?sel=61ae28da87f3400033383e2f
I made the first change (size in the ArrayList constructor). I'm not too worried about the second change, since this code isn't seen by the user. It's just to verify the tests are correct.
This comment is hidden because it contains spoiler information about the solution
The
should contain ORDER BY species
test is a little overly zealous. Most databases (including PostgreSQL) support ordering by the column number. SoORDER BY 6
would be valid (if column order can be guaranteed), as well asORDER BY species
.That is not the definition of Camel Case. If you want to restrict your definition to lower case letters first then you should clarify "lower camel case". However, "camel case" is by definition ambiguous.
https://en.wikipedia.org/wiki/Camel_case
There are no test cases for strings that start with a capital letter. (e.g.
"CamelCase"
)I would assume such an input should produce
"Camel Case"
, but most of the current solutions (including the author's original) produce" Camel Case"
.Java translation for review
I don't think it matters much in this context, but I would consider it a best practice to prevent a) use where it shouldn't be used, and b) accidental re-use of the same variable name.
I should have used
let
(block scope) instead ofvar
(function scope).