// Write a function that returns true if the given Binary Tree is SumTree else false.
// A SumTree is a Binary Tree where the value of a node is equal to sum of the nodes present in its left subtree and right subtree.
// An empty tree is SumTree and sum of an empty tree can be considered as 0. A leaf node is also considered as SumTree.

// Following is an example of SumTree.

//           26
//         /   \
//       10     3
//     /    \     \
//   4      6      3

@@ -460,12 +460,398 @@
    6      3%0A
+%0A%0Afunction isBalanced(root) %7B%0A    function helper( node )%7B%0A        if(!node)%7B%0A            return;%0A        %7D else %7B%0A            if ( node.left.val + node.right.val !== node.val )%7B%0A                return false;%0A            %7D else %7B%0A                isBalanced( node.left && node.right );%0A            %7D%0A            return true;%0A        %7D%0A    %7D%0A    return helper(root.left && root.right);%0A%7D%0A

add first solution