Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.17 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.17 KB

🍀 Binary Search Tree - DS

This repository was created to be used as reference for Binary Search Tree implementation using JavaScript.

The Binary Search Tree class has the following methods:

  • size: returns the size of the tree
  • insert: inserts a new node in the correct position
  • min: returns the min value of the BST
  • max: returns the max value of the BST
  • contains: checks if the value exists in the BST
  • dfsIterative: Depth First Search - Iterative
  • dfsInOrder: Depth First Search - Recursive - [left, root, right]
  • dfsPreOrder: Depth First Search - Recursive - [root, left, right]
  • dfsPostOrder: Depth First Search - Recursive - [left, right, root]
  • bfs: Breadth First Search - Recursive
  • invertTree: Inverts the BST

🚀 How to run

  # Use the following command to execute the file:
  node binary_tree.js

🗃️ Pre - Requisites

  • NodeJS

🤓 Author

👤 Paulo Victor da Silva

😉 Help

Give a ⭐️ if this repo helped you!