File ListSet.h

↰ Parent directory (ADS/set)

The SET as an unsorted LIST of section 8.2: contains(), insert() and remove() in O( n ), insertNew() in O( 1 ) when the item is known to be absent, the operations in O( n m ), which is optimal when the items can only be compared for equality (exercises 8.1 and 8.2).

Definition (ADS/set/ListSet.h)

Detailed Description

The contracts [see File Contract.h]: insertNew() needs an item that is not there, after insert() the item is there and after remove() it is not, and each operation of two sets gives what its name says; the invariant is that no item is there twice. The operations are defined in ListSet.tpp.

  1. Montresor, Algoritmi e Strutture Dati, 2025, section 8.2, https://algoritmicamente.it/materiali/libro/capitoli/cap08.pdf

Donato Meoli

Dipartimento di Informatica Universita’ di Pisa

by Donato Meoli

Includes

Namespaces

Classes

Functions