Intro

A Set is an Abstract Data Type that represents an unordered collection of unique elements. Common uses include fast membership testing and removing duplicate entries. Sets also support mathematical operations like union, intersection, and difference.

Core Operations

  • add(x)
  • remove(x)
  • contains(x)

Mathematical Operations

  • union(A, B)
  • intersection(A, B)
  • difference(A, B)

Implementations