I noticed that in Python too, some test inputs are not sorted. This contradicts the problem statement but it is possible to adjust solutions to cope with unsorted input easily enough.
Perhaps the problem statement should be amended to indicated that the overall array is not necessarily sorted, but some ranges within the array are.
it works, finally! :)
The random test cases were fixed, I forgot to check the basics: now is done!
['-3->0'] should equal ['-2', '0', '-1', '-3->-2']. Please fix.
This problem still exists in the Ruby tests.
Fixed (or so I hope), sorry for the inconvenience!
same problem using Python
['-3->0'] should equal ['-2', '0', '-1', '-3->-2']
Arrays should be sorted. It is an oversight from the Python and Ruby translator. I will ask him to fix up the test cases. Thanks for reporting this.
I noticed that in Python too, some test inputs are not sorted. This contradicts the problem statement but it is possible to adjust solutions to cope with unsorted input easily enough.
Perhaps the problem statement should be amended to indicated that the overall array is not necessarily sorted, but some ranges within the array are.