Replace with sum of greater nodes-binary tree

Test cases are showing no output

hi rishab
while you were building up your bst, at the end you needed to return the root acording to the type of the function


i have made the changes

1 Like

is there multiple BST possible from the given input array?
and 2nd doubt is that, will the given input data always be sorted?

@AASTHA011, please reply…

yes it is sorted data input for these test cases!
as I implemented that in this code:-https://ide.codingblocks.com/s/630978

and
I think
multiple bst are possible for the same array
but if you attach some kind of traversal (post,pre or in )only one bst is possible
go back to two lines As I said I think