Signup or Login to not be a stranger πΆβπ«οΈ
A format for expressing an ordered list of integers is to use a comma separated list of either
Complete the solution so that it takes a list of integers in increasing order and returns a correctly formatted string in the range format.
solution([-10, -9, -8, -6, -3, -2, -1, 0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 14, 15, 17, 18, 19, 20]);
// returns "-10--8,-6,-3-1,3-5,7-11,14,15,17-20"