Find the maximum value of the select pairs i and max from ( i + 1 , right )
if ( right != - 1 ) { maxvalue = Math . max ( maxvalue , arr [ i ] . b - arr [ i ] . a + getMax ( arr , 0 , 0 , n - 1 , i + 1 , right ) ) ; } }