Skip to content

The university project, implementation of Binary Search Tree data structure without the usage of STL containers.

License

Notifications You must be signed in to change notification settings

drago20013/BinarySearchTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BinarySearchTree

University project, implementation of Binary Search Tree data structure without usage of STL containers.

CPP Linux Mac Windows

API

  • Default constructor (can specify comparison criteria when constructing)
  • Copy/Move constructors
  • Initializer list constructor (can specify comparison criteria when constructing)
  • Copy/Move operators
  • Serialize/Deserialize function
  • Insert
  • Emplace
  • Remove
  • Search
  • Clear
  • Root
  • Size
  • Min
  • Max
  • Save/Read to/from file using << / >> operator
  • Insert element using << operator
  • Forward Iterator (inorder)
  • Reverse Iterator (inorder)

First inserted element is the root.

Usage

#include <iostream>
#include "BST.h"

int main(){
    simple::BinarySearchTree<int> iTree{12, 35, 20, 68};
    simple::BinarySearchTree<char> cTree{'b', 's', 't'};

    for(const auto &e:iTree){
        std::cout << e << "\n";
    }
}

Dependencies

LinkedList.h

About

The university project, implementation of Binary Search Tree data structure without the usage of STL containers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published