lecture17 - CSCI-255 Advanced Data Structures Lecture 17...

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

View Full Document Right Arrow Icon
CSCI-255 Advanced Data Structures Lecture 17
Background image of page 1

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

View Full DocumentRight Arrow Icon
Trees for Searching b Was a reasonable ordering criterion applied to construct this tree? s With this ordering, nothing really interesting is achieved in the context of searching
Background image of page 2
Binary Trees – An Informal Definition b A binary tree is a tree in which no node can have more than two children b Each node has 0, 1, or 2 children
Background image of page 3

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

View Full DocumentRight Arrow Icon
Binary Trees – A Recursive Definition 1. An empty structure is a binary tree 2. If T 1 and T 2 are binary trees , then the structure whose root has as its children the roots of T 1 and T 2 is also a binary tree 3. Only structures generated by rules 1 and 2 are binary trees
Background image of page 4
Binary Trees – A Recursive Definition ROOT OF TREE T T 1 T 2 SUBTREES *left_child *right_child
Background image of page 5

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

View Full DocumentRight Arrow Icon
Trees vs. Binary Trees b No node in a binary tree may have more than 2 children, whereas there is no limit on the number of children of a node in a tree
Background image of page 6
Types of Binary Trees b A binary tree in which each node has exactly 0 or 2 children is called a full binary tree
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/26/2009 for the course MATH AND C CSCI255 taught by Professor Dr.ikergondraluja during the Spring '09 term at St. Francis Xavier, Antigonish.

Page1 / 15

lecture17 - CSCI-255 Advanced Data Structures Lecture 17...

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

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