Set Intersection of SortedRanges
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Dec 5 14:10:34 PST 2016
On Monday, 5 December 2016 at 21:48:49 UTC, Nordlöw wrote:
> Ahh, setops has intersection aswell:
>
> https://dlang.org/phobos/std_algorithm_setops.html#setIntersection
>
> I should have a guessed that.
Ahh again, but current Phobos is currently not optimized for the
case when all inputs are SortedArrays. In that case a double
binary search algorithm as describe here
http://cs.stackexchange.com/a/37124/25769
might be faster.
Has anybody already done this?
More information about the Digitalmars-d-learn
mailing list