Returns maximum sum from subset of nodes of binary tree under given constraints
int maxSum ( Node * root ) { pair < int , int > res = maxSumHelper ( root ) ; return max ( res . first , res . second ) ; }