comefrom: <awangdev>72. Edit Distance_3.java
code: public int minDistance(String word1, String word2) {
          if (word1 == null && word2 == null) return 0;
          if (word1 == null || word2 == null) return word1 == null ? word2.length() : word1.length();
          
          int m = word1.length();
          int n = word2.length();
          int[][] dp = new int[m + 1][n + 1];
          
          for (int i = 0; i <= m; i++) {
              dp[i][0] = i;
          }       
          for (int j = 0; j <= n; j++) {
              dp[0][j] = j;
          }
          
          for (int i = 1; i <= m; i++) {
              for (int j = 1; j <= n; j++) {
                  if (word1.charAt(i - 1) == word2.charAt(j - 1)) {
                      dp[i][j] = dp[i - 1][j - 1];
                  } else { 
                      dp[i][j] = Math.min(dp[i - 1][j - 1], Math.min(dp[i][j - 1], dp[i - 1][j])) + 1;
                  }
              }
          }
          return dp[m][n];
      }
masked: public int sample_funcname ( String var_0 , String var_1 ) {
    if ( var_0 == null && var_1 == null ) return 0 ;
    if ( var_0 == null || var_1 == null ) return var_0 == null ? var_1 . length ( ) : var_0 . length ( ) ;
    int var_2 = var_0 . length ( ) ;
    int var_3 = var_1 . length ( ) ;
    int [ ] [ ] var_4 = new int [ var_2 + 1 ] [ var_3 + 1 ] ;
    for ( int var_5 = 0 ;
    var_5 <= var_2 ;
    var_5 ++ ) {
      var_4 [ var_5 ] [ 0 ] = var_5 ;
    }
    for ( int var_6 = 0 ;
    var_6 <= var_3 ;
    var_6 ++ ) {
      var_4 [ 0 ] [ var_6 ] = var_6 ;
    }
    for ( int var_5 = 1 ;
    var_5 <= var_2 ;
    var_5 ++ ) {
      for ( int var_6 = 1 ;
      var_6 <= var_3 ;
      var_6 ++ ) {
        if ( var_0 . charAt ( var_5 - 1 ) == var_1 . charAt ( var_6 - 1 ) ) {
          var_4 [ var_5 ] [ var_6 ] = var_4 [ var_5 - 1 ] [ var_6 - 1 ] ;
        }
        else {
          var_4 [ var_5 ] [ var_6 ] = Math . min ( var_4 [ var_5 - 1 ] [ var_6 - 1 ] , Math . min ( var_4 [ var_5 ] [ var_6 - 1 ] , var_4 [ var_5 - 1 ] [ var_6 ] ) ) + 1 ;
        }
      }
    }
    return var_4 [ var_2 ] [ var_3 ] ;
  }
  