Ad
  • Custom User Avatar

    I had the same problem, the tests contain lists one million in length, i tried running my solution on my locally on my system for a list I generated randomly, it took forever to run. I think we just need a more optimised solution, my solution has a time complexity of O(n**2) meaning for a list of length 1000000 my task perfoms 1000000 squared (one trillion) operations. At this moment i haven't thought of a more optimized solution and i might just resolve to looking up solutions eventually.

  • Custom User Avatar

    You might want to re-read the problem description, as timeouts are likely due to inefficient approaches.

    10,000,000 elements to parse through requires a method that doesn't need to loop back over previous elements that frequently...