psaff...@googlemail.com wrote:
This may be an algorithmic question, but I'm trying to code it in
Python, so...
I have a list of pairwise regions, each with an integer start and end
and a float data point. There may be overlaps between the regions. I
want to resolve this into an ordered list with no overlapping
regions.
... (indication of having at least struggled a bit) ...
Devising an algorithm to do this is making my brain hurt. Any ideas?
I really hope I'm not giving away the key to a homework problem.
One sort key for such lists that I've found fruitful in the past is:
(start, -end)
Maybe it will prove helpful to you as well.
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list