Lecture20

Lecture20 - Announcements 5 Please pick up the handout for...

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

View Full Document Right Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 1 Announcements Announcements 5 Please pick up the handout for today Read Chapter 26&27 Midterm 2 Returned next Tuesday
Background image of page 1

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

View Full DocumentRight Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 2 Last Lecture Last Lecture 5 Intro to Tree ADT Exam review
Background image of page 2
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 3 This Lecture This Lecture 5 More Tree Terms Types of Trees Tree Traversals
Background image of page 3

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

View Full DocumentRight Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 4 5 leaf nodes? siblings of G? ancestors of L? descendents of D? children of I? Which nodes are … Which nodes are … A C D F I E B R S P G H T M L O K J Q N
Background image of page 4
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 5 More Terms More Terms 5 height height length of path left child right child left subtree right subtree number of levels 1 + height of tallest subtree number of edges of the path first child second or last child left child & its descendents right child & its descendents
Background image of page 5

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

View Full DocumentRight Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 6 Tree Types Tree Types 5 General n-ary Binary Binary Search Tree (bst) Expression Parse Heap
Background image of page 6
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 7 General General 5 any number of  children per node no max  A C D F I E B R S P G H T M L O K J Q N
Background image of page 7

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

View Full DocumentRight Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 8 n-ary n-ary 5 no more than  n   children per node 3-ary A C D F I E B R S P G H T M L O K J Q N
Background image of page 8
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission. 9 Binary Trees Binary Trees 5 very common at most  2  children per node each subtree is also a binary tree Full  - when every node in all levels, except the last level, has 2  children.  Nodes in last level have 0 children Complete  - full to next to last level & last level is filled from left to right Other  - not full or complete
Background image of page 9

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

View Full DocumentRight Arrow Icon
05/13/09 ©2004 Deb Deppeler. Some content based on work by Susan Horwitz ©2003. Used by permission.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 36

Lecture20 - Announcements 5 Please pick up the handout for...

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

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