docs: public static int editDistance(String s, String t) {
      // Step 1
      int n = s.length(); // length of s
      int m = t.length(); // length of t
      if (n == 0) {
        return m;
      }
      if (m == 0) {
        return n;
      }
      int[][] d = new int[n + 1][m + 1]; // matrix
      // Step 2
      for (int i = 0; i <= n; i++) {
        d[i][0] = i;
      }
      for (int j = 0; j <= m; j++) {
        d[0][j] = j;
      }
      // Step 3
      for (int i = 1; i <= n; i++) {
        char s_i = s.charAt(i - 1); // ith character of s
        // Step 4
        for (int j = 1; j <= m; j++) {
          char t_j = t.charAt(j - 1); // jth character of t
          // Step 5
          int cost; // cost
          if (s_i == t_j) {
            cost = 0;
          } else {
            cost = 1;
          }
          // Step 6
          d[i][j] = SloppyMath.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
        }
      }
  
      // Step 7
      return d[n][m];
    }