@@ -0,0 +1,861 @@
+public class LeetCode0583 %7B%0A    public int minDistance(String word1, String word2)%0A    %7B%0A        if (word1 == null %7C%7C word2 == null) %7B%0A            return 0;%0A        %7D%0A%0A        int len1 = word1.length();%0A        int len2 = word2.length();%0A%0A        int%5B%5D%5B%5D dp = new int%5Blen1 + 1%5D%5Blen2 + 1%5D;%0A%0A        for (int i = 1; i %3C= len1; i++) %7B%0A            for (int j = 1; j %3C= len2; j++) %7B%0A                if (word1.charAt(i - 1) == word2.charAt(j - 1)) %7B%0A                    dp%5Bi%5D%5Bj%5D = dp%5Bi - 1%5D%5Bj - 1%5D + 1;%0A                %7D else %7B%0A                    dp%5Bi%5D%5Bj%5D = Math.max(dp%5Bi - 1%5D%5Bj%5D, dp%5Bi%5D%5Bj - 1%5D);%0A                %7D%0A            %7D%0A        %7D%0A        return len1 + len2 - 2 * dp%5Blen1%5D%5Blen2%5D;%0A    %7D%0A%0A    public static void main(String%5B%5D args)%0A    %7B%0A        LeetCode0583 leetcode = new LeetCode0583();%0A        System.out.println(leetcode.minDistance(%22sea%22, %22eat%22));%0A    %7D%0A%7D

Add LeetCode0583.java