View Single Post
 
Old 03-04-2020, 03:20 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Since you haven't provided your code we can just talk in concepts.

I would approach this by using a recurring function along the lines of:
1. Build a list of all the relevant ranges and sort in length order
2. Remove the shortest
3. Repeat steps 1 & 2 until there are no more ranges found.

The important part is after removing the shortest range, you do a complete rebuild of the list
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote