title: Maximum Triplet Sum Array
signature: maximumTripletSumArray :: [Integer] -> Integer -> Integer
  maximumTripletSumArray arr n = 
source_py: def maximum_triplet_sum_array(arr, n):
      sm = (- 1000000)
      for i in range(0, n):
          for j in range((i + 1), n):
              for k in range((j + 1), n):
                  if (sm < ((arr[i] + arr[j]) + arr[k])):
                      sm = ((arr[i] + arr[j]) + arr[k])
      return sm
source_cpp: int maximum_triplet_sum_array(vector<int> arr, int n) {
    int sum = INT_MIN;
    for ( int i = 0;
    i < n;
    i ++ ) for ( int j = i + 1;
    j < n;
    j ++ ) for ( int k = j + 1;
    k < n;
    k ++ ) if ( sum < arr [ i ] + arr [ j ] + arr [ k ] ) sum = arr [ i ] + arr [ j ] + arr [ k ];
    return sum;
  }