in reply to Request help on optimizing a loop for looking up numbers

I'm not sure if I follow the problem you are trying to solve. But if I view it as something like finding the set of line segments that are not subsegments, then it might helpful to sort your connection array before doing your checks.

I suspect that sorting by increasing start and decreasing end, the solution then reduces to checking if the current connection is a subconnection of the previous one. But I could be wrong.

  • Comment on Re: Request help on optimizing a loop for looking up numbers

Replies are listed 'Best First'.
Re^2: Request help on optimizing a loop for looking up numbers
by Anonymous Monk on Dec 11, 2013 at 17:12 UTC
    1-6, 2-3, 4-5