Find minimum and maximum value in the path from LCA to b
for ( ; j < Path2 . size ( ) ; j ++ ) { if ( min2 > Path2 . get ( j ) ) min2 = Path2 . get ( j ) ; if ( max2 < Path2 . get ( j ) ) max2 = Path2 . get ( j ) ; }