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.
I don't see any way to pass the LOOOONG list that has, like, 1 mil items in it. Is there any way to get past that? I'm using python.
python new test framework is required. updated in this fork
Modifying the input breaks the random tests.
there is no "example of the working code" in the description when selecting JavaScript. When selecting C++, both the algorithm and the "working code" are written in Python
hi, I would reccomand having a small edge case section in the code for (0,0), (1,1), (0,1), (-1, 0), (-1, 1) etc preferably in the sample test also
also, maybe adding some random testing would be a good idea, however make sure you genrate random ints and cast them to longs, as dealing with the edges of representable numbers was not defined.
best of luck :)
This comment is hidden because it contains spoiler information about the solution
Current reference solution is wrong, for example:
The length of the answer list should be
C(6, 3) = 20
instead of9
.Log
[((4, 4999999), [7, 6]), ((3, 5000000), [6, 7])]
Ten Million Numbers With Middle Pair: Should terminate with a valid pair output: [7, 6] should equal [6, 7]
&
Log
[((6, 9999998), [-3, 8]), ((5, 9999999), [8, -3])]
Ten Million Numbers With Pair At End: Should terminate with a valid pair output: [-3, 8] should equal [8, -3]
The above log shows a list of tuples, in which the first tuple is the iterator, the second the index of the matching pair.
As you can see the output insists the matching pair where the second values index is larger is the answer.
What's the deal? All the other tests pass. It's just these tests.
Scala translation
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Since there is a
performance
tag, the input size should be provided.NO random tests in
This comment is hidden because it contains spoiler information about the solution
Typescript translation https://www.codewars.com/kumite/63088f73f22754000fa5a983?sel=63088f73f22754000fa5a983
Loading more items...