Summary
In this chapter, you learned the basic definition of the set data structure. In order to fully appreciate the functionality of the structure, we briefly examined the most basic principles of set theory upon which the set data structure is based. Following this, we looked at the most common operations of sets and how they relate to the set theory functions. We then looked at how to implement a set in each of the four languages we're studying in this text. Next, we revisited the users logged into a service problem one more time to see if we could improve upon its implementation at all using a set data structure as opposed to an array or list. Following this, we examined a case study where sets would be beneficial. Finally, we looked at the varying implementations of sets, including hash table-based sets, tree-based sets, and array-based sets.