Skip to content

This is a repository for balancing a Binary Search Tree using a brute force recursive algorithm.

License

Notifications You must be signed in to change notification settings

Dkaban/Brute-Force-Tree-Balance

Repository files navigation

Brute Force Binary Search Tree Balance

This is a repository for balancing a Binary Search Tree using a brute force recursive algorithm.

Languages: Java

The driver class is the BalanceTreeDriver.java file.

How it works

  • Create a LinkedBinarySearchTree
  • Add elements to it
  • Create a list, sorted via an InOrder Traversal
  • Balance that list via a recursive algorithm inside the LinkedBinarySearchTree.java class
  • Balancing works by picking the middle element, then doing the same for the left and right subtrees, recursively.

About

This is a repository for balancing a Binary Search Tree using a brute force recursive algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages