CS223-0129-Trees

# CS223-0129-Trees - Trees Neil Tang CS223 Advanced Data...

This preview shows pages 1–7. Sign up to view the full content.

CS223 Advanced Data Structures and Algorithms 1 Trees Trees Neil Tang Neil Tang 01/29/2008 01/29/2008

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

View Full Document
CS223 Advanced Data Structures and Algorithms 2 Class Overview Class Overview Basics Binary Tree Binary Tree Traversal General Tree
CS223 Advanced Data Structures and Algorithms 3 Basics Basics Tree: A tree consists of a distinguished node r (root) and zero or more nonempty subtrees T 1 , T 2 , …T k , each of whose roots are connected by a direct edge from r. Child, parent, leaf, sibling Path and path length Depth of a node, depth of a tree Height of a node, height of a tree Ancestor, descendant

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

View Full Document
CS223 Advanced Data Structures and Algorithms 4 An Example An Example
CS223 Advanced Data Structures and Algorithms 5 Properties Properties No cycle. There only exists a unique path between a pair of nodes on a tree. The height of a tree = the depth of that tree.

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

View Full Document
6 Binary Tree Binary Tree Binary tree:
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/17/2008 for the course CS 223 taught by Professor Tang during the Spring '07 term at MSU Bozeman.

### Page1 / 11

CS223-0129-Trees - Trees Neil Tang CS223 Advanced Data...

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

View Full Document
Ask a homework question - tutors are online