comefrom: <awangdev>42. Trapping Rain Water_2.java
code: public int trap(int[] height) {
          if (height == null || height.length == 0) return 0;
          int n = height.length, left = 0, right = n - 1;
          int maxLeft = height[0], maxRight = height[n - 1];
          
          int total = 0;
          while (left < right) {
              if (maxLeft < maxRight) {
                  left++;
                  if (maxLeft > height[left]) total += maxLeft - height[left];
                  else maxLeft = height[left]; 
              } else {
                  right--;
                  if (maxRight > height[right]) total += maxRight - height[right];
                  else maxRight = height[right];
              }
          }
          return total;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) return 0 ;
    int var_1 = var_0 . length , var_2 = 0 , var_3 = var_1 - 1 ;
    int var_4 = var_0 [ 0 ] , var_5 = var_0 [ var_1 - 1 ] ;
    int var_6 = 0 ;
    while ( var_2 < var_3 ) {
      if ( var_4 < var_5 ) {
        var_2 ++ ;
        if ( var_4 > var_0 [ var_2 ] ) var_6 += var_4 - var_0 [ var_2 ] ;
        else var_4 = var_0 [ var_2 ] ;
      }
      else {
        var_3 -- ;
        if ( var_5 > var_0 [ var_3 ] ) var_6 += var_5 - var_0 [ var_3 ] ;
        else var_5 = var_0 [ var_3 ] ;
      }
    }
    return var_6 ;
  }
  