Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 951 Bytes

File metadata and controls

25 lines (17 loc) · 951 Bytes

BST-Implementation

Binary Search Tree Implementation in C++

Created a Library Template Class for Binary Search Tree in C++ which provides the following functionalities-

  1. Insertion-

     Insertion of a new Element is based on properties of BST i.e. Element in the left subtree
     must me smaller than the root and the elements on the right subtree must be larger than root element. 
    
  2. Deletion-

     After Deletion of a node from the BST it is replaced by its Inorder Successor OR Inorder Predecessor,
     which total depends on the user's choice.
    
  3. Traversals-

     There are 3 Types of Traversals in a Tree-
     
     PreOrder-> Root - Left - Right
     InOrder-> Left - Root - Right
     PostOrder-> Left - Right - Root
     
     It can display all three types of Traversals based on user's choice.
    
  4. Topmost Element-

     It is used to show the Top element i.e. Root of the Binary Search Tree.