<awangdev>850. Rectangle Area II_1.java
private int calcHeightDiff(TreeMap<Integer, Integer> map) {

        int height = 0, pre = 0, count = 0;
        for (Map.Entry<Integer, Integer> e : map.entrySet()) {
            if (count > 0) height += e.getKey() - pre;
            count += e.getValue();
            pre = e.getKey();
        }
        return height;
    }
private int sample_funcname ( TreeMap < Integer , Integer > var_2 ) {
  int var_4 = 0 , var_5 = 0 , var_6 = 0 ;
  for ( Map . Entry < Integer , Integer > var_8 : var_2 . entrySet ( ) ) {
    if ( var_6 > 0 ) var_4 += var_8 . getKey ( ) - var_5 ;
    var_6 += var_8 . getValue ( ) ;
    var_5 = var_8 . getKey ( ) ;
  }
  return var_4 ;
}
