
468 Data Structures Using C
10.2 SETS
A set is an unordered collection of homogeneous elements. Each element occurs at most once with the
following associated properties:
n All elements belong to the Universe. The Universe is defined as “all potential elements of set”.
n An element is either a member of the set or not.
n The elements are unordered.
Some examples of sets are given below.
Cat_ Family 5 {Lion, Tiger, Puma, Cheetah, Jaguar, Leopard, Cat, Panther, Cougar, Lynx, Ocelot}
Fruits 5 {mango, orange, banana, grapes, apple, guava, peach}
LAN 5 {Comp, Mech, Elect, Civil, Accts, Estb, Mngmt, Hostel}
Note: The LAN is a set of nodes of a local ...