Returns maximum sum from subset of nodes of binary tree under given constraints
def getMaxSum ( node ) : NEW_LINE INDENT if ( node == None ) : NEW_LINE INDENT return 0 ; NEW_LINE DEDENT mp = dict ( ) NEW_LINE return getMaxSumUtil ( node , mp ) ; NEW_LINE DEDENT