comefrom: <awangdev>275. H-Index II_1.java
code: public int hIndex(int[] citations) {
          if (citations == null || citations.length == 0) {
          	return 0;
          }
          int n = citations.length;
          int start = 0, end = n - 1;
          while (start + 1 < end) {
          	int mid = start + (end - start) / 2;
              int h = n - mid;
              if (citations[mid] < h) start = mid;
              else { 
          		if (mid - 1 >= 0 && citations[mid - 1] <= h) return h;  
                  end = mid;
              }
          }
          if (citations[start] >= n - start) return n - start;
          if (citations[end] >= n - end) return n - end;
          return 0;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) {
      return 0 ;
    }
    int var_1 = var_0 . length ;
    int var_2 = 0 , var_3 = var_1 - 1 ;
    while ( var_2 + 1 < var_3 ) {
      int var_4 = var_2 + ( var_3 - var_2 ) / 2 ;
      int var_5 = var_1 - var_4 ;
      if ( var_0 [ var_4 ] < var_5 ) var_2 = var_4 ;
      else {
        if ( var_4 - 1 >= 0 && var_0 [ var_4 - 1 ] <= var_5 ) return var_5 ;
        var_3 = var_4 ;
      }
    }
    if ( var_0 [ var_2 ] >= var_1 - var_2 ) return var_1 - var_2 ;
    if ( var_0 [ var_3 ] >= var_1 - var_3 ) return var_1 - var_3 ;
    return 0 ;
  }
  