...

/

Introduction to Tree

Introduction to Tree

Get yourself introduced to trees and their basic terminologies in this lesson.

What is a tree?

A tree is a non-linear data structure used to represent the hierarchical relationship between a parent node and a child node. Each node in the tree is connected to another node by directed edges.

Why do we use trees?

The main advantage of using a tree over linear data structures like arrays or linked lists is that we do not have to search an element in linear time.

Important terms related to trees

Before diving deeper into the ...