<qiyuangong>628_Maximum_Product_of_Three_Numbers_2.java
public int maximumProduct(int[] nums) {
        int min1 = Integer.MAX_VALUE, min2 = Integer.MAX_VALUE;
        int max1 = Integer.MIN_VALUE, max2 = Integer.MIN_VALUE, max3 = Integer.MIN_VALUE;
        for (int n: nums) {
            if (n <= min1) {
                min2 = min1;
                min1 = n;
            } else if (n <= min2) {     // n lies between min1 and min2
                min2 = n;
            }
            if (n >= max1) {            // n is greater than max1, max2 and max3
                max3 = max2;
                max2 = max1;
                max1 = n;
            } else if (n >= max2) {     // n lies betweeen max1 and max2
                max3 = max2;
                max2 = n;
            } else if (n >= max3) {     // n lies betwen max2 and max3
                max3 = n;
            }
        }
        return Math.max(min1 * min2 * max1, max1 * max2 * max3);
    }
public int sample_funcname ( int [ ] var_0 ) {
  int var_3 = Integer . MAX_VALUE , var_4 = Integer . MAX_VALUE ;
  int var_6 = Integer . MIN_VALUE , var_7 = Integer . MIN_VALUE , var_8 = Integer . MIN_VALUE ;
  for ( int var_9 : var_0 ) {
    if ( var_9 <= var_3 ) {
      var_4 = var_3 ;
      var_3 = var_9 ;
    }
    else if ( var_9 <= var_4 ) {
      var_4 = var_9 ;
    }
    if ( var_9 >= var_6 ) {
      var_8 = var_7 ;
      var_7 = var_6 ;
      var_6 = var_9 ;
    }
    else if ( var_9 >= var_7 ) {
      var_8 = var_7 ;
      var_7 = var_9 ;
    }
    else if ( var_9 >= var_8 ) {
      var_8 = var_9 ;
    }
  }
  return Math . max ( var_3 * var_4 * var_6 , var_6 * var_7 * var_8 ) ;
}
