
3
Lists
3.1 Introduction
A list
is a common and simple data structure consisting of a group of related
elements, distinguished by the fact that the order of its constituent elements
can be rearranged without altering the list’s information content. Note that
this definition of a list excludes what ar e commonly known as ranked lists.
Some examples o f lists are the heights of the eighth graders at your local
middle school, the birthdays of your friends, or the prices of all the books on
your bookshelf.
The elements that make up a list should be of the same dimensionality. For
example, a list could be a collection of length measurements or a collection
of ...