comefrom: <awangdev>Russian Doll Envelopes_1.java
code: public int maxEnvelopes(int[][] envelopes) {
          if (envelopes == null || envelopes.length == 0 
             || envelopes[0] == null || envelopes[0].length == 0) {
              return 0;
          }
          Arrays.sort(envelopes, new Comparator<int[]>() {
              public int compare (int[] a, int[] b) {
                  if (a[0] == b[0]) {
                      return a[1] - b[1];
                  } else {
                      return a[0] - b[0];
                  }
              }
          });
          
          int n = envelopes.length;
          int[] dp = new int[n];
          int max = 0;
          for (int i = 0; i < n; i++) {
              dp[i] = 1;
              for (int j = 0; j < i; j++) {
                  if(envelopes[j][0] < envelopes[i][0] && envelopes[j][1] < envelopes[i][1]) {
                      dp[i] = Math.max(dp[i], dp[j] + 1);
                  }
              }
              max = Math.max(max, dp[i]);
          }
          return max;
      }
masked: public int sample_funcname ( int [ ] [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 || var_0 [ 0 ] == null || var_0 [ 0 ] . length == 0 ) {
      return 0 ;
    }
    Arrays . sort ( var_0 , new Comparator < int [ ] > ( ) {
      public int compare ( int [ ] var_1 , int [ ] var_2 ) {
        if ( var_1 [ 0 ] == var_2 [ 0 ] ) {
          return var_1 [ 1 ] - var_2 [ 1 ] ;
        }
        else {
          return var_1 [ 0 ] - var_2 [ 0 ] ;
        }
      }
    }
    ) ;
    int var_3 = var_0 . length ;
    int [ ] var_4 = new int [ var_3 ] ;
    int max = 0 ;
    for ( int var_5 = 0 ;
    var_5 < var_3 ;
    var_5 ++ ) {
      var_4 [ var_5 ] = 1 ;
      for ( int var_6 = 0 ;
      var_6 < var_5 ;
      var_6 ++ ) {
        if ( var_0 [ var_6 ] [ 0 ] < var_0 [ var_5 ] [ 0 ] && var_0 [ var_6 ] [ 1 ] < var_0 [ var_5 ] [ 1 ] ) {
          var_4 [ var_5 ] = Math . max ( var_4 [ var_5 ] , var_4 [ var_6 ] + 1 ) ;
        }
      }
      max = Math . max ( max , var_4 [ var_5 ] ) ;
    }
    return max ;
  }
  