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.
It is not stated anywhere in the description that you can't reuse letters. If you look at the author's solution, his solution would also "fail" the test you put.
Heh, nice trick with the 'constructor'. Codewars makes me too complacent just using truthy/falsy values.
This should probably be a 6kyu, nice kata though.
This is a bit tricky for a 6kyu, I'd probably label it as 5kyu
I feel like test cases should also be testing strings like "5", there's some solutions that wouldn't pass if that was the case.
The tests cases don't test for this case but your solution wouldn't work if x was something like "5"
Just so you know, this doesn't work for all test cases, you got lucky you didn't get a failed test case in a random test. Here's an example where it returns true when it should be false: 854658
Good Kata, however when I first submitted I got 1 random test wrong, so I tried it again so I can just submit it and it was right. But now when I go back to try and find that edge case that gave me an error I can't find it anymore.
̶T̶h̶e̶ ̶l̶a̶s̶t̶ ̶o̶n̶e̶ ̶i̶s̶n̶'̶t̶ ̶a̶ ̶c̶a̶r̶r̶y̶,̶ ̶y̶o̶u̶ ̶d̶o̶n̶'̶t̶ ̶c̶a̶r̶r̶y̶ ̶w̶h̶e̶n̶ ̶t̶h̶e̶r̶e̶ ̶a̶r̶e̶ ̶n̶o̶ ̶n̶u̶m̶b̶e̶r̶s̶ ̶l̶e̶f̶t̶ ̶t̶o̶ ̶c̶a̶r̶r̶y̶ ̶t̶o̶,̶ ̶y̶o̶u̶ ̶j̶u̶s̶t̶ ̶a̶d̶d̶ ̶i̶t̶.̶
edit: actually looking in to it, you're right it should count it as a carry
Unless I'm misunderstanding something the test cases aren't sufficient here for all edge cases. You say the final array should be sorted regardless of the order in the input array. But there is no test case that really checks this. For example my code passes all your tests but it doesn't work if I pass in this array [2,3,4,1]. This input will return this answer [[2, 4], [1, 3]] which is not sorted. But my code passes the kata no problem. Also your random test cases are always sorted in ascending order so those will never catch it either.
arr > ary
This is 7kyu level
Why can't I print out the input on the tests I'm failing? Console log is only working on some of the test cases but not on all of them. The console log is the first line of the function.
it's in the 'status' variable
I'm not used to codewars problems with node 18 haha
Loading more items...