Data Structures and Algorithms - Trees
Data Structures and Algorithms - Trees
DATA STRUCTURE
WHAT?
The tree is a nonlinear
hierarchical data
structure and
comprises a collection
of entities known as
nodes.
PRACTICAL APPLICATION
Significant place in the realm of IT education
1] Decision Tree
2] Node Structure in DOM (Document Object Model)
3] File System
4] Chess Engine – Game Playing
THE
ANATOMY OF
TREE
TREE :: The Tree Foundation
GENERIC STRUCTURE
TREE ELEMENTS
Root: Topmost node of a tree
Subtree: Any node of the tree along with its descendant
Parent: The node has an edge-sharing to a child node.
Child: The sub-node of a parent.
Sibling: Nodes with the same parent.
Leaf: The last node which does have any subnode.
Edge: Connecting link between two nodes.
Height: Length of the longest path from root to a leaf node
Depth: Number of edges from the root node to that node
BINARY TREE