Home  Writing  Games  Music  Dev  About 

Trees

Data structure that forms some kind of meaningful hierarchy on a set of Data.

Start off with a node that is called the root. Nodes in trees are connected by edges. (C++: abstract, represented by pointers that connect to other nodes). (Could also be represented by array index)

The nodes of a linked list are kinda like a tree, each connected by a one-directional edge that is represented by the next pointer. The pointers have no special meaning other than acting as links. In trees, the links or edges signify some relationship.

A tree itself is a type of graph.

Traversals

Go here[./treeTraversals.html] for traversal info.

General Trees

Binary Trees

kd-trees

B-trees

2-3 trees

2-3-4 trees

BSP tree

AVL trees

Red-black trees

Heaps