Understanding a binary tree
A tree is a nonlinear data structure that stores elements hierarchically. Every element in a tree is called a node, and except the topmost node, each node has a parent node and zero or more children nodes. The individual nodes in a tree are connected by edges, which may be unidirectional or bidirectional. A tree can only have edges between a parent and a child node, and therefore, a tree cannot have cycles.
Loading Image
Representation of a tree
The definition of a tree above has many terms like parent, children, etc. We will learn more about these terminologies in this lesson.
Liking the course? Check our discounted plans to continue learning.