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.
Interesting. Never thought of doing it that way before. Maybe a bad practice, but still a good puzzle.
Fixed
I highly agree, but it's not an issue. It's a suggestion, because it does not relate to the completion of the kata.
Julia translation
Python translation kumited -- please check and approve (author is inactive).
Are you somehow mutating the input array?
This is a bad tip, and teaches people a bad practice. Please, remove it from the description.
Alright, I get it now.
[ true, {} ]
has 2 elements, and you have to return the truthy values in that array, so you should return the same array giventrue
and{}
are both truthy.No, the corresponding values are truthy in that case.
Done.
It says: when there are no corresponding values (false in this case) return empty array.
if the number of the array's values is even return truthy values...
Number of values =
2
Truthy values:
true
,{}
Expected:
[true, {}]
What's wrong with that?
[ true, {} ] gives '[ true, {} ]' as expected result. Shouldn't it be '[]'? I think the test cases are broken.
Loading more items...