Skip to main content
ICT
Lesson AB30 - Binary Search Trees
 
Main Previous Next
Title Page >  
Summary >  
Lesson A1 >  
Lesson A2 >  
Lesson A3 >  
Lesson A4 >  
Lesson A5 >  
Lesson A6 >  
Lesson A7 >  
Lesson A8 >  
Lesson A9 >  
Lesson A10 >  
Lesson A11 >  
Lesson A12 >  
Lesson A13 >  
Lesson A14 >  
Lesson A15 >  
Lesson A16 >  
Lesson A17 >  
Lesson A18 >  
Lesson A19 >  
Lesson A20 >  
Lesson A21 >  
Lesson A22 >  
Lesson AB23 >  
Lesson AB24 >  
Lesson AB25 >  
Lesson AB26 >  
Lesson AB27 >  
Lesson AB28 >  
Lesson AB29 >  
Lesson AB30 >  
Lesson AB31 >  
Lesson AB32 >  
Lesson AB33 >  
Vocabulary >  
 

C. Shape of a Binary Tree page 5 of 15

  1. The shape of a binary tree will affect its performance as a data structure and is dependent on the initial order of the data set used to build the tree.

  2. If the data set is already sorted (1 2 3 4...), the binary tree is essentially a linked list with an unused left pointer in each node.

  3. A data set in random order will lead to a more balanced tree.

  4. Ideally, we want binary trees that are balanced with almost equal numbers of nodes in each subtree of every node. A balanced binary tree is defined as follows:

    For every node in the tree, the number of nodes in its left subtree is equal to the number of nodes in its right subtree, plus or minus one.

    Please note: Balancing binary trees will not be covered in this curriculum.

 

Main Previous Next
Contact
 © ICT 2006, All Rights Reserved.