Binary tree - Introduction

Data Structure and Algorithms - Tree - Tutorialspoint
  • A tree is called a binary tree if each node has either 0, 1 or 2 children only.
  • It is a family of Data Structures i.e. BST, Heap tree, Syntax tee, Red Black tree, AVL tree etc. all are binary tree.
  • Types of Binary tree:
    • Strict Binary tree - If each node has either 2 children or none.
    • Full Binary tree - If each non leaf node has 2 children and all the leaf nodes are at the same level
    • Complete binary tree - If all the levels are completely filled except possibly the last level and the last level has all the elements as left as possible.

Comments

Popular posts from this blog

Quick Sort

Disjoint Set - Implemented Using Arrays

Graph Traversal Code - BFS on Graph represented using Adjacency Matrix