In-place convert a binary tree to its sum tree
Given a binary tree, in-place convert it into its sum tree. Each node’s value is equal to the sum of all elements present in its left and right subtree in a sum tree. Consider the value of an empty node as 0.