Binary Search Tree in C++

0 comments

Using the binary search tree implementation that I will provide, please complete the following:

  1. Write a method that find the total number of nodes in a BST.
  2. Write a method that find the height of a BST.
  3. Write a method that prints a pre order traversal of a BST.
  4. Write a method that prints a post order traversal of a BST.
  5. Write a method that takes an integer target value as a parameter and deletes the node. Make sure there is no memory leak on program exit.
  6. Write a recursive method that checks whether a given binary tree is a BST or not.
  7. Write a method that searches the given value and returns the address of the node if it is found, otherwise returns NULL.
  8. Write a method that finds the maximum element in a BST.
  9. Write a method that finds kth biggest element in a BST.

10. Write a method that finds the minimum absolute difference in a BST.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}