title: Maximize Sum Arrii
signature: maximizeSumArrii(arr, n) {
source_py: def maximize_sum_arrii(arr, n):
      arr.sort()
      sum = 0
      for i in range(n):
          sum += (arr[i] * i)
      return sum
source_cpp: int maximize_sum_arrii(vector<int> arr, int n) {
    sort(arr.begin(), arr.end());
    int sum = 0;
    for ( int i = 0;
    i < n;
    i ++ ) sum += ( arr [ i ] * i );
    return sum;
  }