This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS2134 Lecture 13 Binary Trees CS2134 Trees Up to now, the data structures weve studied (vectors, stacks queues, lists) have stored sequences of data each item has a single successor Often, data is organized hierarchically, not sequentially organization chart for a company classification of the animal kingdom file system Trees can be used to characterize such relationships: items may have several successors, called children Well focus on binary trees , in which each node has at most two children in addition to applications to hierarchical data, these have applications to searching and sorting. CS2134 Binary trees Def 1: empty, or unique root node, and each node has at most two children, the left child and the right child , and for each node there a unique path from the root down to the node. Def 2: empty, or a node, or a node along with two trees, the right subtree and the left subtree CS2134 Terminology...
View Full
Document
 Spring '07
 Hellerstein
 Algorithms, Data Structures

Click to edit the document details