Tree in Tamil | DSA in Java | Part 1

Опубликовано: 23 Июль 2026
на канале: Lee Code
1,203
44

In data structures, a Tree is a non-linear hierarchical data structure made up of nodes connected by edges. At the very top, we have the root node, which has no parent. Every node can have child nodes, and these children can have their own children, forming a branching structure.

If two or more nodes share the same parent, they are called siblings. A node with no children is called a leaf node, while the rest are internal nodes.

We measure a node’s depth by counting the edges from the root to that node, and its height by counting the longest path from that node down to a leaf. A subtree is just any node along with all its descendants.

Trees are everywhere — in file systems, organizational charts, and even family trees — and they’re the foundation for more advanced structures like binary trees, heaps, and tries.


Key Terminology:
Root – The topmost node in a tree. It has no parent.
Parent – Any node that has one or more child nodes.
Child – A node directly connected to another node (its parent) below it in the hierarchy.
Siblings – Nodes that share the same parent.
Leaf (External Node) – A node with no children; an endpoint in the tree.
Depth of a Node – The number of edges from the root to that node.
Height of a Node – The number of edges in the longest path from that node to a leaf.
Height of the Tree – The height of the root node (longest path from root to any leaf).
Subtree – A smaller tree formed from any node and all its descendants.
Ancestor – Any node on the path from a given node to the root (excluding the node itself).
Descendant – Any node that lies below a given node in the hierarchy (including children, grandchildren, etc.).