Programming is like sex. One mistake and you have to support it for the rest of your life. Michael Sinz

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.