Implementing Set Abstraction
using Lists
lA set is not a list, but
lA set can be represented by a list:
lsimply ignore the ordering of the list, and
leither:
lignore duplicates, or
lguarantee no duplicates
l
l
lIgnoring vs. guaranteeing have advantages and disadvantages (why?)
called a
representation
invariant