Ad
  • Default User Avatar

    Same thing for java, it gives an array with 150k-200k elements

  • Custom User Avatar

    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.

  • Custom User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar

    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?