in reply to Re: Re: Code efficiency / algorithm
in thread Code efficiency / algorithm
If all the companies had mutually-exclusive ranges, then you could simply place them in an Array::IntSpan and look them up. But since your ranges intersect, you will need to intersect them with each other (using the operations of Set::Infinite like intersects and contains). That's basically what a tree algorithm would do.
|
|---|