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.
Everything's fine with the kata.
I had a look, you failed on test 4 and not on test 5.
Test 4 is with:
a1 = [] a2 = []
. Aren't you mixing test 4 and test 5?I am very sorry but there are no error in the tests. You can see at the top of the page that more than 5000 guys passed the kata and the tests are the same in all languages. Cheers!
Remember this in the description?
NOTE: There will also be lists tested of lengths upwards of 10,000,000 elements. Be sure your code doesn't time out.
Your code probably has a runtime of O(n^2), which just means for every element in a list, you're iterating over n more elements. Even if you only iterate over n/2 or n-1 elements per element (nested for loop), you're still winding up iterating on (10,000,000/2)^2 ~= 25,000,000,000,000; or 25 quadrillion items—and that's the efficient version! No computer can parse this under 6-8 seconds... unless you're running military spec and have over 3 teraflops. :)