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.
"more than" (
"zero\0one\0two\0\0many", 4
) isn't tested: https://www.codewars.com/kata/reviews/66ca922c180b675e18865bb3/groups/66ce1f23bf5043bfb07639f1While thinking about a better way to write it, I did the same thing accidentally. Well, it just shows a property of this sequence.
It doesn't seem clear from the description if the same value can appear in multiple layers.
The initial solution has
function twoOldestAges
.This comment is hidden because it contains spoiler information about the solution
JavaScript:
but
parseInt
never returnstrue
...Now trying truthy instead of
true
:but
parseInt
never returns a truthy value here...This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
IDK about edge case coverage, but out-of-bounds coordinates are still reported as "TypeError: result.forEach is not a function".
The random tests in Lua have multiple missing and repeated numbers.
Someone else approved the translation. I've done minimal fixing.
Missing tests with unsorted arrays, misssing random tests.
LLVM has troubles optimizing loops with inclusive upper bounds: https://github.com/rust-lang/rust/issues/45222
Technically, it does apply to this case, but this loop isn't vectorizable and my guess is that unrolling won't help with this division, so it doesn't really matter here.
The test expect a
TypeError
forbool
, butbool
is an integer type in Python.The random tests capture the same mutable variable by reference.
Loading more items...