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.
in older javascript versions,
Array.prototype.sort()
was not guaranteed to be stable.false == 0 consider it.
"Zero elements are defined by either 0 or "0". Some tests may include elements that are not number literals."
When I run
removeZeros([1,null,"5","2",8,6,null,false,"0",0])
in my IDE it returns[1, null, '5', '2', 8, 6, null, false, '0', 0]
.When I run
removeZeros([1,null,"5","2",8,6,null,false,"0",0])
on Codewars it returns[1, null, '5', '2', 8, 6, null, false, 0, '0']
.Eh?! Help pls :D
Okay :/
No random tests.
I'm sure this has been done before (simple dictionary lookup and string capitalization). Don't think this kata adds anything new to CW.
You should provide the mappings from/to both languages in preloaded.
The biggest part of the kata (and most tedious) is having to monkey type these mappings.
Yeah... was my bad. All good :)
Please read this paragraph and make sure that you are reading logs correctly. The input you presented should indeed return
true
, and it's possible the eror you get is related to some other test case (next one or previous one).expected:<false> but was:<true>
But you can reach the goal or do I missunderstand smth here?
Ah okay. Thanks for the explanation. Seems like I need to refactor my solution :D
Yeah, looks like an issue that needs to be fixed. But the result of
solution([-83, 33, -32, 83, -56, -43, 76, 65, -100, 47, 48, 49, 50, 51, 52, -22, -98, 22, 8, -17, -38, -37, -36, -35, -34, -33, -62, 74, 75, 76, 77, 78, 79, 6, 7, 8, 9, 10, 11, 12, 51, 52, -52, -51, -50, -49, -48, -47, -46, -57, 82, 86, 87, 88, 89, 90, 91, -34, -33, -32, -31, -30, -10, -92, 32])
is correct if you have written a working algorithm ;)Ups. Second example is wrong anyways. I was talking about
["NORTH", "WEST", "SOUTH", "EAST"]
. But I think I understand now.Didn't you read the description where it is explained?
This comment is hidden because it contains spoiler information about the solution
Loading more items...