dsa.hashset module — ucxdsa documentation

# dsa.hashset module

Module containing a HashSet class implemented using HashTable.

class dsa.hashset.HashSet(iterable=None)

  Bases: `object`

  A set implementation using a hash table for storage.

  add(item)

    Add an item to the set.

    Parameters:

      item – The item to add.

  contains(item)

    Check if an item is in the set.

    Parameters:

      item – The item to check.

  remove(item)

    Remove an item from the set.

    Parameters:

      item – The item to remove.