Lecture13

Lecture13 - CS2134 Lecture 13 Binary Trees CS2134 Trees Up...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 9

Lecture13 - CS2134 Lecture 13 Binary Trees CS2134 Trees Up...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online