I have this array: [[0,10,20],[1,15,25],[2,20,40]]
0, 1, 2 would be ids and 10,20 15,25 20,40 would be their respective range.
So, I need to figure out the ranges and which ids has which range.
Each id would represent a flashlight, and each one has its own range, I need this to figure out which areas are being illuminated by which flashlights.
I don't know if was clear enough, so here is what I expect to be returned from the code:
[
[0],[10,15],
[0,1],[15,20],
[1,2],[20,25],
[2], [25,40]
]
Thanks in advance.