Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. Alan Kay

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.