Ad
  • Custom User Avatar

    Try again, it should be fixed now.

  • Custom User Avatar

    EDIT:
    disregard my previous comment.
    the question requires that you do not remove duplicates, see Daotar's comment, this solved my issue.

  • Custom User Avatar

    Yes, I've tried a previously working solution and it failed, so maybe someone changed the test suite and now it doesn't work.

  • Custom User Avatar

    I get that, but still... the timeout is erratic and you can see others complaining about that too

  • Custom User Avatar

    The 12000 miliseconds timeout is for the whole test suite, in Python there are 9 fixed tests, 100 random tests and 100 random huge tests.

  • Custom User Avatar

    There is something fishy with this exercise, or better put, with the test cases. I get it, the first couple of attempts may not be optimal but when I ran my solution on large arrays (in fact much larger than stated in the instructions e.g.:

    l = np.random.randint(np.iinfo(np.int64).max - (1<<62) , np.iinfo(np.int64).max, size=1000000)

    it still completes in about 5 sec rather than taking longer than 12000 milsec timeout claimed by the test platform.

  • Custom User Avatar

    This question has an unclear description/instructions with respect to corner cases, specifically regarding how duplicates are to be handled.. Clarification would improve the question