dan_l
Active Member
Hi,
I'm struggling mightily to wrap my head around this one. I've got ideas, but every time I sit down to do it I end up going down a rabbit hole. I've got a bunch of numbers like:
1
2
3
9
14
15
16
19
I want to parse them as a FROM and a TO like:
From To
1 3
9 9
14 16
19 19
Note how the 2 would be included in 1-3 and 15 would be included in 14-16. Data will not necessarily be sorted natively.
I'm looking for a pure code solution. I don't even need somebody to write it out all the way or anything I'm just looking for broader advice on how it would be coded out.
I'm struggling mightily to wrap my head around this one. I've got ideas, but every time I sit down to do it I end up going down a rabbit hole. I've got a bunch of numbers like:
1
2
3
9
14
15
16
19
I want to parse them as a FROM and a TO like:
From To
1 3
9 9
14 16
19 19
Note how the 2 would be included in 1-3 and 15 would be included in 14-16. Data will not necessarily be sorted natively.
I'm looking for a pure code solution. I don't even need somebody to write it out all the way or anything I'm just looking for broader advice on how it would be coded out.