Binary tree implementation in C++

Tree


Tree datastructure is a specialized form of graph, it has a single root element and each node can have 'n' number of children. The famous variation which is widely used is Binary Tree. Binary Tree allows each node to have two children- left child and right child. 




One of the important usecase of tree is for sorting and searching. As tree arrangement reduces the search time to log(N), binary search tree is being implemented by many C++ standard container classes. 



 Implementation:


Below implementation classes provides C++ implementation of Binary Tree datastructrue along with commonly used operations such as:


1. Node insertion.


2. Node removal.


3. Traversal 


   1.1. Depth First Traversal - preorder, inorder and postorder


   1.2 Breadth First Traversal