Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.1 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.1 KB

Generic Binary Search Tree

This BST class implements the following public methods:

  • find_min()
  • find_max()
  • contains()
  • empty()
  • size()
  • retrieve()
  • preorder()
  • postorder()
  • inorder()
  • clear()
  • insert()
  • remove()

Moreover, this BST class has 4 different constructors:

  • Default constructor
  • Copy constructor
  • Range constructor
  • Initializer list constructor

You can find more details about the implementation and description of all methods and constructors here.

Prerequisites

In order to use this BST class your compiler needs to support C++11 Standard. If you use a GCC compiler, at least GCC 4.8.1 is needed.

How to use

Clone this repo to your local machine and move your .cpp files to the src folder inside the project.

Running the tests

Inside the src folder you will find a drive_bst.cpp that has a few unit tests. Compile and run this file to check if everything is okay.

g++ -std=c++11 drive_bst.cpp -g && ./a.out

If all tests pass, you can start playing around with the BST by including bst.h in your own .cpp files.

Authors

  • Deangela C. G. Neves
  • Maria Clara Martins