If McDonalds were run like a software company, one out of every hundred Big Macs would give you food poisoning, and the response would be, ‘We’re sorry, here’s a coupon for two more.’ “ Mark Minasi

Transform a BST to greater sum tree

Language Java | Level Intermediate | Category Data structure | September 8, 2015 7:57 am


Data structure Description

Write a program to convert Binary Search Tree to Greater sum tree.


Output

   					 

All Binary Tree Values: 1  2  7  11  15  29  35  40  
All Binary Tree Values: 13  11  11  0  29  0  40  0  

				    

Comments


No comments available!

Please login to add comments.