Skip to content

twistershark/binary_search_tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

071ad1c Β· Jul 12, 2022

History

3 Commits
Jul 12, 2022
Jul 11, 2022

Repository files navigation

πŸ€ 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!

About

Binary Search Tree - DS - JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published