The animation below illustrates the different Binary Tree traversal mechanisms described in Lecture 10.
The numbers that appear on the different tree nodes, indicate the order in which they would appear were they to be output.
The change in edge colours corresponds to the order in which sub-trees are visited.
To start the system running, click on one of the Keys marked New Tree A or New Tree B.
A different (random) binary tree can be chosen at any point, by clicking on these.
To view a traversal method, simply click on the appropriate key.
Warning: A rather naive tree drawing method has been used, and on occasion this can result in leaf nodes `overlapping' on the display and/or there being insufficinet space in the drawing area to display all of the tree.
|
(Corrected: 22nd October 2001)