Returns maximum sum from subset of nodes of binary tree under given constraints
public static int getMaxSum ( Node node ) { if ( node == null ) return 0 ; HashMap < Node , Integer > mp = new HashMap < > ( ) ; return getMaxSumUtil ( node , mp ) ; }