Template Function ADS::setUnion(const ListSet<T>&, const ListSet<T>&)

Function Documentation

template<class T>
ListSet<T> ADS::setUnion(const ListSet<T> &A, const ListSet<T> &B)

the union: C starts as B and gets the items of A not in B, inserted without looking for them in C, O( n m ) time (exercise 8.2)