Big O of Distinct () Method with Custom IEqualityComparer

Does anyone know the Big O algorithm used in the Distinct() method with a custom IEqualityComparer ?

+4
c # big-o linq
source share
1 answer

There is an equal question about SO. What guarantees exist in the complexity of executing (Big-O) LINQ methods?

See this section in the difference answer:

Great, GroupBy Join, and I also believe aggregate aggregation methods (Union, Intersect, and Except) use hashing, so they should be close to O (N) instead of O (N 2).

+6
source share

All Articles