I'm trying to come up with an algorithm that seems like it ought to be
really easy, but it's turning out to be pretty tough...

Basically I have three pairs of start/stop times, e.g.:

   3, 5
   4, 10
  15, 20

I want the total time covered by all these ranges.  I can't just say (5-3 +
10-4 + 20-15) because the 3,5 and 4,10 ranges overlap.  The desired answer
for this case is 13, 3 to 10 and 15 to 20.  I have the start times in two
arrays, @starts and @stops.

I have to do this probably a million+ times.  Any ideas on how I could go
about this?

TIA.

- Bryan



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to