代码之家  ›  专栏  ›  技术社区  ›  Graviton

使用自定义IEqualityComparer的distinct()方法的大O

  •  4
  • Graviton  · 技术社区  · 14 年前

    任何人都知道 Distinct() 方法,自定义 IEqualityComparer ?

    1 回复  |  直到 14 年前
        1
  •  6
  •   Community kfsone    7 年前

    “这里有一个平等的问题” What guarantees are there on the run-time complexity (Big-O) of LINQ methods?

    有关distinct的答案,请参见本节:

    与众不同,Groupby Join,我相信 还有集合聚合方法 (联合、交叉和除外)使用 散列,所以它们应该接近 o(n)而不是o(n_2)。