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.
The tests that are run when you click Run Tests are different than the ones that run when you press Submit.
Run Tests only runs the tests in the editor below the code editor. Submit will run more thorough tests written by the author of the kata.
If you aren't sure what's causing your solution to fail the tests, try outputting the two input parameters to the console.
I agree with g964 - (and I didn't realize this), but if you output the two input parameters to the console, you'll be able to see exactly what values are causing those specific tests to fail.
Also, I think you have two problems:
I hope that points you in the right direction!
Yeah, this was a bit tricky. This case is described in the directions in one of the examples. Basically, the expected output is the first, smallest pair that equals the sum, not just the first pair you come across (in the example, the "first pair" is defined by the last index of the pair, it seems; in the last example, a pair with indices 1,5 comes after 3,4 because a last index of 5 comes after a last index of 4 - this is why in the REDUX problem the answer needs to have indices 3 and 4).
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I think 7 seconds is the max