Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Rich Cook

Insert and Delete in BST

Language Java | Level Intermediate | Category Data structure | September 6, 2015 7:51 am


Data structure Description

Write a program to insert an item to the binary search tree and delete the item from binary search tree. If the node value is less than or equal to the parent node, insert the node to left the tree. If the node value is greater than or equal to the parent node, insert the node in the right subtree.


Output

   					 

All Binary Tree Values: 1 2 3 4 5  
All Binary Tree Values after remove: 1 2 4 5  

				    

Comments


No comments available!

Please login to add comments.