Book Image

Everyday Data Structures

By : William Smith
Book Image

Everyday Data Structures

By: William Smith

Overview of this book

Explore a new world of data structures and their applications easily with this data structures book. Written by software expert William Smith, you?ll learn how to master basic and advanced data structure concepts. ? Fully understand data structures using Java, C and other common languages ? Work through practical examples and learn real-world applications ? Get to grips with data structure problem solving using case studies
Table of Contents (20 chapters)
Everyday Data Structures
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Data Types: Foundational Structures

Chapter 7. Sets: No Duplicates

Within the confines of computer science, sets are typically used as a simple collection of objects that contain no duplicates. In the broader realm of mathematics in general, however, a set is an abstract data structure that can be described as a collection of distinct objects or values stored in no particular order. For the purpose of this discussion, we will choose to view a set as the computer implementation of a mathematically finite set.

When working with problems to which the mathematical concepts of set theory can be applied, set data structures provide a powerful group of tools for combining and examining relationships between collections of similar objects. However, even outside set theory and mathematics, the set data structure provides functionality that can be useful in everyday applications. For example, since a set naturally eliminates duplicates, any application that requires maintaining or editing a collection of unique elements would benefit...