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.
My bad, in JS, arrays can contain up to 800,000 elements, I guess I must have looked at the tests in another language. However, the rest of my original response remains valid.
i used console.log to show me the array that given and it was so long in the end writed "... and 162821 item more"
check the photo https://ibb.co/sPSvm56
There are no inputs with length greater than 60,000 . However, if your code times out, you must find a more efficient approach. Naive solutions won't pass this kata.
i made a code its work but with last test its give me timeout because the input is like 200k numbers any idea how to fix it?
Made three solutions and only the last was sucsessful during basic tests, took several hours in two days to find out the most optimized one :)