Binary Search Tree

Binary Search Tree


This is my own Binary Search Tree class that is written by me from scratch. The purpose is to learn more about Binary Search Tree


  • It is written by using IntelliJ IDEA Community Edition 2019.1.3 x64
  • JDK version 11

How to install:

If you use IntelliJ IDEA use new -> Project From Version Control -> Git and paste 

How to use:

  • Using the Main class to run and test any method
  • The BinarySearchTree class is fully written with method:
    • add(int value) : add a new node with the value to the tree
    • isContained(int value): search and return the Boolean if the tree contains the value or not
    • remove (int value): delete (or in some case replace) the node with the value , print out warning if the node is not found
    • printInOrder(): actually the name could be Traversal In Order but it reflects more accurately what the method does.


  • Due to the class is written purely for learning purpose so very little Exception handle is expected
  • Except for the printInOrder() method , all of the other parts is written by me from scratch based on the description (Of course I may peek at a small part of code from others on the internet). However the printInOrder() method was too complex for me due to my poor skill at Recursion . As a result I referenced the code from here:


MIT License

Leave a Reply

Your email address will not be published. Required fields are marked *