-- - for test case -- - 7 / \ Null - 3 ( case - 1 ) value of res will be INT_MIN but the answer is 4 , which is returned by the function maxPathSumUtil ( ) .
if ( res == INT_MIN ) { return val ; } return res ; }