Animal Homepage Overview of the Animation Repository Animal Homepage Logo
      Go to bottom of page
German version
New Homepage
News
FAQ
Description
Download
Support
Documentation
Examples
Repository
 
Publications
Related Systems
  Animation: Binary Tree - Definition and Traversal

Animation: Binary Tree - Definition and Traversal

Animation Systems Collection--Animations Collection

Description

This animation introduces the data structure Binary Tree.

First the structure of a binary tree is shown and the terms (inner) node, root, leaf, level, path, path length defined.

Following that the possibilities of traversing a binary tree are presented.

Pre-Order
Here the root of the subtree is processed first before going into the left then right subtree.
In-Order
After the complete processing of the left subtree the root is processed followed by the processing of the complete right subtree.
Post-Order
The root is processed only after the complete processing of the left and right subtree.
Level-Order
Using a queue the tee is processed by levels. So first all nodes on level i are processed from left to right before the first node of level i+1 is visited.

The complete source code is shown for each mode of traversing the tree. In each step the current command is highlighted using colours.

Screen Shot(s):
demo Image, see caption
Building a binary tree
demo Image, see caption
Inorder tree traversal
demo Image, see caption
Level order tree traversal using a queue
Classification
Animation Rating
You can provide a rating for this animation. The rating is performed on a scale of 1 to 10, where 10 is the highest possible grade.
1(very bad) 2 3 4 5 6 7 8 9 10(very good)
File information
Title Binary Tree - Definition and Traversal
Animation URL http://www.animal.ahrgr.de/Anims/en/binaryTree.aml
Animation Applet Animal Applet
Animation System Animal
Animation Type dynamic full VCR
Supported OS(s) Linux,MacOS,Windows 95,Windows 98,Windows ME,Windows NT,Windows 2000,Unix
Author(s) Guido Rößling
Date 1999-05-11
File Size size 8730 Byte
Number of Accesses: 20571
Added to DB by Guido Rößling
Average Rating 5.1857(70 submitted ratings)
Language: en
Number of Accesses: 20571

BibTeX bibliographic entry for citations:

@Misc{Rößling:1999,
   author = {Guido Rößling},
   title = {Binary Tree - Definition and Traversal},
   howpublished = {WWW: \url{http://www.animal.ahrgr.de/Anims/en/binaryTree.aml}},
 }
 
This page was last edited 20. 07. 2007 14:18 Page start