question: public static < E extends Comparable < E > > void toChildrenSum ( BinaryNode < E > node ) { if ( node == null || node . left == null && node . right == null ) return ; toChildrenSum ( node . left ) ; toChildrenSum ( node . right ) ; Integer nodeValue = ( Integer ) ( node == null ? 0 : node . value ) ; Integer leftChildValue = ( Integer ) ( node . left == null ? 0 : node . left . value ) ; Integer rightChildValue = ( Integer ) ( node . right == null ? 0 : node . right . value ) ; int diff = leftChildValue + rightChildValue - nodeValue ; if ( diff < 0 ) { increment ( node , - diff ) ; } else if ( diff > 0 ) { } }
target:  Converts a tree to hold the children sum invariant. <p/> It only increments data values in any node (Does not change structure of tree and cannot decrement value of any node).