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.
fixed
Approved
Great kata, but my previous one was https://www.codewars.com/kata/5ac616ccbc72620a6a000096 (5kyu)
And they are really incompareable in terms of complexity...
I think this kata should be 6 kyu maximum
Could you add random tests? You could have a look at JS for a reference.
Author's solution was wrong. Updated JS with fixed solution.
fixed
Yes, the current
oS
function is wrong. Take the comparator on the last line from here and use it instead.All solutions are failing now, I think author's solution is wrong.
truncateThreshold
should be set to0
just in case, andassert.isTrue(Array.isArray(actual) && actual.length == 0, "Empty array [] expected")
is a really weird way to doassert.deepEqual(actual, [])
.Random tests added JS. I'm not sure the reference solution is correct. I've tested a couple of solutions, they all fail on some edge cases.
In fact, all solutions except 2 fail after adding random tests :s
JS adapted.
C# Translation, as with other translations, no input validation required.
approved
Loading more items...