comefrom: <awangdev>72. Edit Distance_4.java
code: public int minDistance(String word1, String word2) {
          if (word1 == null && word2 == null) {
              return 0;
          }
          char[] words1 = word1 == null ? new char[0] : word1.toCharArray();
          char[] words2 = word2 == null ? new char[0] : word2.toCharArray();
          
          int m = word1.length();
          int n = word2.length();
          int[][] dp = new int[m + 1][n + 1];
           
          for (int i = 0; i <= m; i++) {
              for (int j = 0; j <= n; j++) {
  				if (i == 0) {
                      dp[i][j] = j;
                      continue;
                  }
                  if (j == 0) {
                      dp[i][j] = i;
                      continue;
                  }
  				dp[i][j] = Math.min(dp[i - 1][j - 1], Math.min(dp[i][j - 1], dp[i - 1][j])) + 1;
                  if (words1[i - 1] == words2[j - 1]) {
                      dp[i][j] = Math.min(dp[i][j], dp[i - 1][j - 1]);
                  }
              }
          }
          return dp[m][n];
      }
masked: public int sample_funcname ( String var_1 , String var_2 ) {
    if ( var_1 == null && var_2 == null ) {
      return 0 ;
    }
    char [ ] var_6 = var_1 == null ? new char [ 0 ] : var_1 . toCharArray ( ) ;
    char [ ] var_7 = var_2 == null ? new char [ 0 ] : var_2 . toCharArray ( ) ;
    int var_9 = var_1 . length ( ) ;
    int var_10 = var_2 . length ( ) ;
    int [ ] [ ] var_12 = new int [ var_9 + 1 ] [ var_10 + 1 ] ;
    for ( int var_13 = 0 ;
    var_13 <= var_9 ;
    var_13 ++ ) {
      for ( int var_14 = 0 ;
      var_14 <= var_10 ;
      var_14 ++ ) {
        if ( var_13 == 0 ) {
          var_12 [ var_13 ] [ var_14 ] = var_14 ;
          continue ;
        }
        if ( var_14 == 0 ) {
          var_12 [ var_13 ] [ var_14 ] = var_13 ;
          continue ;
        }
        var_12 [ var_13 ] [ var_14 ] = Math . min ( var_12 [ var_13 - 1 ] [ var_14 - 1 ] , Math . min ( var_12 [ var_13 ] [ var_14 - 1 ] , var_12 [ var_13 - 1 ] [ var_14 ] ) ) + 1 ;
        if ( var_6 [ var_13 - 1 ] == var_7 [ var_14 - 1 ] ) {
          var_12 [ var_13 ] [ var_14 ] = Math . min ( var_12 [ var_13 ] [ var_14 ] , var_12 [ var_13 - 1 ] [ var_14 - 1 ] ) ;
        }
      }
    }
    return var_12 [ var_9 ] [ var_10 ] ;
  }
  