Function difference

  • Category

    Get a Set representing the difference of a and b (a \ b). The order of parameters matters.

    Time complexity: O(n)

    Space complexity: O(n)

    Type Parameters

    • T

    Parameters

    • a: Iterable<T>

      First iterable

    • b: Iterable<T>

      Second iterable

    Returns Set<T>

    A new Set which is the difference of a and b

    Use Set#difference() instead.

    Set