Ad
  • Custom User Avatar
    • no fixed tests in the test cases part
    • empty array isn't tested
    • the default import in the solution setup could be suppressed. And note that py 3.6+ doesn't need that anymore.
    • what's the point of doing 700 random tests? Extract some interesting edge cases, rather...

    Side note: is that a friend of yours or your alter account? upvoting each other's kata...? upvoting each others solutions... while clearly none of you know what you're doing (for instance, the current upvoted solution is just awful about the performances, on long inputs)

    Oh, btw, arrays of length 1000 aren't "large". Try with millions of elements, and you'll see wookie's solution will choke to death.