b_book1.gif (162 bytes)Data - Structures
B+-tree (Add/inserting (1)|(2) Deleting) | Application areas

Tree

A tree is defined to be a hierarchical organisation of records with a 1 to many relationship.
Probably the most familiar tree structure is a computer file directory.
Records are called nodes, relationships are called branches. The node at the top of the tree is called a root.

dadstr01.gif (3659 bytes)dadstr02.gif (5519 bytes)

Binary Tree

There are many types of tree: binary, threaded. A familiar type is binary tree (b-tree), where each node has no more than two subtrees attached. When stored in an array, retrieval uses a search technique as described for arrays, and addition and deletion is achieved by rearrangement of pointers. This technique is often used to work out the number in the game "guess a number between 1 and 100".

dadstr03.gif (6168 bytes)

[Rev 14/03/99] 28/5/97 © 1997-99 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.