This section contains 1,069 words (approx. 4 pages at 300 words per page) |
A tree is a type of data structure. Data structures are ways for programmers to store and organize data while a program is running. Different data structures are used to perform different tasks on data efficiently.
A tree is composed of nodes. Each node has an item of data and a connection to other nodes. There are many types of trees, such as binary, B+, heap, AVL, and red-black. Every tree is a collection of nodes that is identified by a special node known as the root. The root of a tree (usually drawn at the top) is connected to other nodes. These are known as internal nodes. The internal nodes are connected to more internal nodes. The structure continues to branch down until the bottom nodes are reached. These nodes, to which no more nodes are connected, are called leaves. When drawn with the root at the...
This section contains 1,069 words (approx. 4 pages at 300 words per page) |