If there is single element , return it . Else return maximum of first element and maximum of remaining array .
return ( n == 1 ) ? arr [ i ] : Math . max ( arr [ i ] , getMax ( arr , i + 1 , n - 1 ) ) ; }