Returns probability of choosing a pair with maximum sum .
function findMaxSumProbability ( a , n ) { let total = n * ( n - 1 ) / 2 ; let max_sum_pairs = countMaxSumPairs ( a , n ) ; return max_sum_pairs / total ; }