0% found this document useful (0 votes)
14 views2 pages

Basic Termonology of Tree

The document provides definitions for basic tree terminology, including nodes, edges, and types of trees such as binary trees and binary search trees. It also explains structural concepts like level, depth, height, and degree of nodes. Additionally, it outlines various tree traversal methods, including inorder, preorder, postorder, and level-order.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Basic Termonology of Tree

The document provides definitions for basic tree terminology, including nodes, edges, and types of trees such as binary trees and binary search trees. It also explains structural concepts like level, depth, height, and degree of nodes. Additionally, it outlines various tree traversal methods, including inorder, preorder, postorder, and level-order.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Terminology with Definitions

1. Tree
A tree is a non-linear data structure consisting of nodes connected by edges, arranged in a
hierarchical manner.
2. Node
A node is a fundamental unit of a tree that contains data and may have links to other nodes
(children).
3. Root
The root is the topmost node in a tree. It is the only node without a parent.
4. Edge
An edge is a connection between a parent and a child node in a tree.
5. Child
A child is a node that descends from another node (its parent) in the hierarchy.
6. Parent
A parent is a node that has one or more child nodes.
7. Leaf (or External Node)
A leaf is a node that does not have any children.
8. Internal Node
An internal node is any node in the tree that has at least one child.
9. Subtree
A subtree is a portion of a tree that includes a node and all its descendants.

Structural Terminology with Definitions

10. Level
The level of a node represents its distance from the root, with the root being at level 0.
11. Depth
The depth of a node is the number of edges from the root node to that node.
12. Height
o Height of a node: The number of edges on the longest downward path from the node to a
leaf.
o Height of a tree: The height of the root node.
13. Degree
The degree of a node is the total number of children it has.
14. Sibling
Siblings are nodes that share the same parent.

Tree Types and Traversals

15. Binary Tree


A binary tree is a tree in which each node has at most two children, referred to as the left and right
child.
16. Binary Search Tree (BST)
A binary tree where the left subtree contains nodes with values less than the parent node, and the
right subtree contains nodes with values greater than the parent node.
17. Complete Binary Tree
A binary tree in which all levels are completely filled except possibly the last, which is filled from
left to right.
18. Full Binary Tree
A binary tree in which every node has either 0 or 2 children.
19. Perfect Binary Tree
A binary tree in which all internal nodes have exactly two children and all leaf nodes are at the same
level.
20. Balanced Tree
A tree where the height difference between the left and right subtrees of any node is no more than
one.
21. Tree Traversal
Tree traversal is the process of visiting all nodes in a tree in a specific order. Common types include:
o Inorder (Left, Root, Right)
o Preorder (Root, Left, Right)
o Postorder (Left, Right, Root)
o Level-order (Breadth-first)

You might also like