My solution to this problem was accepted previously, but now it's exceeding time limit. Can someone tell me what changed in this problem?

Here's my solution:

```
public class Solution {
public int minDistance(String word1, String word2) {
int m = word1.length();
int n = word2.length();
int[][] D = new int[m + 1][n + 1];
int i,j;
D[0][0] = 0;
for (i = 1; i <= m; i++) {
D[i][0] = i;
}
for (j = 1; j <= n; j++) {
D[0][j] = j;
}
for (i = 1; i <= m; i++) {
for (j = 1; j <= n; j++) {
D[i][j] = Math.min(Integer.MAX_VALUE, D[i][j - 1] + 1);
D[i][j] = Math.min(D[i][j], D[i - 1][j] + 1);
if (word1.charAt(i - 1) == word2.charAt(j - 1))
D[i][j] = Math.min(D[i][j], D[i - 1][j - 1]);
else
D[i][j] = Math.min(D[i][j], D[i - 1][j - 1] + 1);
}
}
return D[m][n];
}
}
```

It's TLE-ing for the test case:

```
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef"
"bcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefg"
```