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.
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.
Nice.
Grab yourself a Mushroom Slice from the BP.
Regex wizardry. You naughty thing, you.
Sorry, laddo! Noted.
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
Don't get discouraged, I think it's good if you're able to write your own method.
Also now you've learned how to solve this challenge in another way. It's a win-win situation.
Most readable code submitted.
+1 Rep
Be aware that
.split('')
won't work for multilingual inputs - emoji's are one such example that would trip up this solution.Be aware that
.split('')
won't work for multilingual inputs - emoji's are one such example that would trip up this solution.This comment is hidden because it contains spoiler information about the solution
Be aware that
.split('')
won't work for multilingual inputs - emoji's are one such example that would trip up this solution.Be aware that
.split('')
won't work for multilingual inputs - emoji's are one such example that would trip up this solution.Be aware that
.split('')
won't work for multilingual inputs - emoji's are one such example that would trip up this solution.Be aware that
.split('')
won't work for multilingual inputs - emoji's are one such example that would trip up this solution.Loading more items...