The use of COBOL cripples the mind; its teaching should therefore be regarded as a criminal offense. E.W. Dijkstra

Add all greater values to every node in a given BST

Language Java | Level Intermediate | Category Data structure | September 6, 2015 8:09 am


Data structure Description

Given a Binary Search Tree, modify it so that all greater values in the given BST are added to every node.


Output

   					 

All Binary Tree Values: 1  2  3  4  
All Binary Tree Values After modify: 3  2  3  4  

				    

Comments


No comments available!

Please login to add comments.