Open hrldcpr opened 2 years ago
Set
O(mlgn)
(Also, is there a heuristic for plus-ing the intersection up from empty if it's small, versus minus-ing it down from full (as the current code does) if it's big? Probably nothing consistent…)
Set
, then iterate over whichever set is smaller, so we getO(mlgn)
complexity, with m<n