Académique Documents
Professionnel Documents
Culture Documents
– A computer’s main memory is not organized as arrays, lists, stacks, queues, and
trees but is instead organized as a sequence of addressable memory cells. Thus,
all other structures must be simulated. How this simulation is accomplished is
the subject of this chapter.Organizations such as arrays, lists, stacks, queues,
and trees are abstract tools that are created so that users of the data can be
shielded from the details of actual data storage and can be allowed to access
information as though it were stored in a more convenient form. The common
thread is that the user has the privilege of accessing data as an abstract tool.
Arrays
– A tree data structure is a powerful tool for organizing data objects based on keys. It
is equally useful for organizing multiple data objects in terms of hierarchical
relationships (think of a ``family tree'', where the children are grouped under their
parents in the tree).
Trees Data Structures
The topmost node in the tree is called the root. There is only one root per tree
and one path from the root node to any node.
Every node (excluding a root) in a tree is connected by a directed edge from
exactly one other node. This node is called a parent.
Child − The node below a given node connected by its edge downward is called
its child node.
Leaf − The node which does not have any child node is called the leaf node.
Common operations