CS223-0129-Trees

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

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

View Full Document Right Arrow Icon
CS223 Advanced Data Structures and Algorithms 1 Trees Trees Neil Tang Neil Tang 01/29/2008 01/29/2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms 2 Class Overview Class Overview Basics Binary Tree Binary Tree Traversal General Tree
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS223 Advanced Data Structures and Algorithms 4 An Example An Example
Background image of page 4
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.
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Binary Tree Binary Tree Binary tree:
Background image of page 6
Image of page 7
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 Right Arrow Icon
Ask a homework question - tutors are online