Binary Trees - 1

Covered in this section:

Introduction

A binary tree is a hierarchical data structure where each node has at most two children, referred to as the left child and the right child. The topmost node in the tree is called the root, and nodes without children are called leaves.

Binary Tree Graphical Representation

The image above illustrates a binary tree with the following characteristics:

Here are some common terms associated with binary trees:

Representation of binary Tree:


        struct Node {
            //data
            Node* left;
            Node* right;
        };
        
Next lesson