the random tests are weird. how does this make sense?
[(-98, -21), (-20, 50), (56, 83)] should equal [(-98, 100)]
It failed me for 59 cases like this
This comment is hidden because it contains spoiler information about the solution
Raised as an issue.
Exact duplicate of this kata.
Random input generation time reduced by a factor of 3, I'm not sure if will be enough but I will mark it as resolved for now
this one is closer (but not exactly the same, even if almost the very same): https://www.codewars.com/kata/5495bfa82eced2146100002f
na a "real" duplicate
but the exact duplicate exists somewhere, iirc. Published (or done) not so long ago...
Around 9 secs -> 8855ms
The random input generation is terribly slow.
Looks like a duplicate of this kata.
Edit: similar, but not quite the same.
I agree. If I pass a list into someone else's function, I want at least a warning in the docs if it's going to modify it.
Please recheck this solution. Since xs is a reference to a list outside of the function, it has the side affect of modifying the data structure. That could be a nasty surprise to the user of this function. I believe a better solution is to run the sort on a copy of the list.