Click here to see the full article post
- can someone please explain how does 2 > 5 > 13 become 20 > 18 > 13
- How is this a Greater Tree? what does Greater tree even mean ?
- it directly jumps to saying reverse inorder traversal... looking online, reverse inorder traversal is we first traverse all noes (left and right) before traversing its parent... so i am confused :(
here is what others say about reverse in order traversal
@seakhar The link you posted is about a reverse level-order traversal.
- Each node has the values of all greater nodes added to its value. Said another way, each node has the sum of values in its right subtree added to its value.
- I don't think "Greater Tree" is a real thing elsewhere.
- A reverse in-order traversal traverses the nodes in descending value. At least, it does in a BST. An in-order traversal is not well-defined for arbitrary trees.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.