If the absolute difference of current pair ( i , j ) is greater than the maximum difference calculated till now , update the value of result .
if ( calculateDiff ( i , j , arr ) > result ) : NEW_LINE INDENT result = calculateDiff ( i , j , arr ) NEW_LINE DEDENT return result NEW_LINE