Using the binary search tree implementation that I will provide, please complete the following:
- Write a method that find the total number of nodes in a BST.
- Write a method that find the height of a BST.
- Write a method that prints a pre order traversal of a BST.
- Write a method that prints a post order traversal of a BST.
- 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.
- Write a recursive method that checks whether a given binary tree is a BST or not.
- Write a method that searches the given value and returns the address of the node if it is found, otherwise returns NULL.
- Write a method that finds the maximum element in a BST.
- Write a method that finds kth biggest element in a BST.
10. Write a method that finds the minimum absolute difference in a BST.


0 comments