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.
According to statement those pair indices will be smaller that will be output but in fixed sample test by mistake it wrote the output wrong ([3,7] instead of [5,5]). that why its always giving me error timeout
yes
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.
Your code is too slow. See https://docs.codewars.com/training/troubleshooting#timeout.
Not a kata issue. See https://docs.codewars.com/training/troubleshooting#post-discourse.
wth, everytime I run the code it shows me execution timed out!!
Was able to copy-paste your done into Ideone and get it working after removing the JQuery-style "${}" elements and it returned [1, 7] as expected.
I'd say double-check the output with print statements just in case.
Got it, didn't read the assignment carefully
The Kata specifications outline the behavior that makes your current interpretation invalid, since the paired numbers 3 and 7 appear to the right of an alternate complete pair. Try a new solution that follows that spec!
Wrong task. We are looking for the nearest two pairs. Fine. [10, 5, 2, 3, 5, 7], 10) - here is a test that all correct solutions fail. Correct answer: [3,7]
I get it :)
Nested for-loops are not my friends anymore :(
I really liked this task, but it would not be superfluous to clarify that there are no two pairs in which the second element is the same.
timeout error
Great kata! Loved it!
If anyone is wondering you need O(n) time complexity to be able to pass all the tests. Hope it will help a little :)
python new test framework is required. updated in this fork
Loading more items...