I have array similar to this
[
[0, 10]**,
[1, 3]**,
[5, 11]**,
[14, 20]**,
[10, 11]**
]
** Denotes an object containing the start and end indexes shown in the array
Now, the intersections are [1, 3], [5,10], [10,11]
What is the best way to write a method that returns the objects containing of the intersecting sets? (Could just store them in an array of conflicted stuff as we go along)
The biggest issue I'm having is how do I do this such that each object is compared with eachother object?
there are n! ways to do this (i think, I'm a bit rusty on my combinatorics)