comefrom: <gouthampradhan>math_RotateFunction_1.java
code: public int maxRotateFunction(int[] A) {
      if (A.length == 0 || A.length == 1) return 0;
      int max = Integer.MIN_VALUE;
      int l = A.length;
      int sum = 0, prodSum = 0;
      for (int i = 0; i < l; i++) {
        prodSum += (A[i] * i);
        sum += A[i];
      }
      max = Math.max(max, prodSum);
      for (int i = 0; i < l - 1; i++) {
        prodSum = (prodSum - sum + A[i] + ((l - 1) * A[i]));
        max = Math.max(max, prodSum);
      }
      return max;
    }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 . length == 0 || var_0 . length == 1 ) return 0 ;
    int max = Integer . MIN_VALUE ;
    int var_1 = var_0 . length ;
    int var_2 = 0 , var_3 = 0 ;
    for ( int var_4 = 0 ;
    var_4 < var_1 ;
    var_4 ++ ) {
      var_3 += ( var_0 [ var_4 ] * var_4 ) ;
      var_2 += var_0 [ var_4 ] ;
    }
    max = Math . max ( max , var_3 ) ;
    for ( int var_4 = 0 ;
    var_4 < var_1 - 1 ;
    var_4 ++ ) {
      var_3 = ( var_3 - var_2 + var_0 [ var_4 ] + ( ( var_1 - 1 ) * var_0 [ var_4 ] ) ) ;
      max = Math . max ( max , var_3 ) ;
    }
    return max ;
  }
  