ãµã¨ãããã並åã¢ã«ã´ãªãºã ã使ã£ãç·¨éè·é¢ãè¨ç®ããã¢ã«ã´ãªãºã ãæ¸ããããªã£ãã®ã§æ¸ãã¦ã¿ãã ã¾ããé常ã®ç·¨éè·é¢ã§ããLevenshtein Distanceãæ±ããã¢ã«ã´ãªãºã ã¯ä»¥ä¸ã®ããã«æ¸ãã int levenshteinDistance(String A, String B) { int m = A.length(); int n = B.length(); int dp[] = new int[n + 1]; int next[] = new int[n + 1]; for (int i = 0; i <= n; i++) dp[i] = i; for (int i = 1; i <= m; i++) { next[0] = i; for (int j = 1; j <= n; j++) { if (A.charAt(i - 1) == B.charAt(j - 1))
{{#tags}}- {{label}}
{{/tags}}