Binary Search Tree

Project information

  • Course: Data Structures
  • Project date: Spring 2022
  • Programming Language/Frameworks: C++
  • Project URL: Github

For this assignment, I created a Binary Search Tree program that allows me to store values of data types int, float, and string using C++ templates. The user will be able to insert values, delete values, retrieve values, and get the length of the tree. The user has access to 3 printing options: in-order, pre-order, and post order. It also contains 3 advanced features: getNumSingleParent, getNumLeafNodes, and getSumOfSubtrees. The function getNumSingleParent returns the number of nodes that have one child. The function getNumLeafNodes returns the number of leaf nodes. And the last function, getSumOfSubtrees returns the sum of subtrees of a node inputed by the user.

Designed by BootstrapMade