The main function which returns sum of the maximum sum path between two leaves . This function mainly uses maxPathSumUtil ( )
public virtual int maxPathSum ( Node node ) { Res res = new Res ( ) ; res . val = int . MinValue ; maxPathSumUtil ( root , res ) ; return res . val ; }