/BSTree_Recursive

Binary search Tree recursive(most of it) written in c++17

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Binary-search tree v0.2.9

==============

Introduction

  • Binary-search tree data-structure written in c++ modern built with smart-raw pointers and iterators

Requirement

  • c++17 or later

    • Tested on:
      • g++-9 -std=c++1z
      • g++10 -std=c++1z
      • g++-11 -std=c++1z
      • clang++-11 -std=c++1z
      • clang++-10 -std=c++1z
  • Catch2 for testing

Everything inside bst.hpp

image

  • including: min() and size()

Usage

  • simply download this library then copy lib folder to your working directory and include it like this: #include "lib/bst.hpp"!

  • if you're on ubuntu/pop_os you can do this:

    • open terminal then do sudo apt install nautilus-admin then when it's done do nautilus -q

    • open usr/include folder as administrator ( as root if you're using nemo )

    • add lib folder into usr/include, you may rename library into bst after you're done!, this is how you include it without copying it every time into your directory!

    • #include <lib/bst.hpp>
      #include <iostream>
      
      auto main()
          -> int
      {
        bst_<int> nums {1, 2, 3, 5};
        nums.print(1);
      }