英语翻译Write a Windows form application that returns the differ
英语翻译
Write a Windows form application that returns the difference of two given files using Levenshtein distance (edit distance).
A commonly-used bottom-up dynamic programming algorithm for computing the Levenshtein distance involves the use of an (n + 1) × (m + 1) matrix,where n and m are the lengths of the two strings.Here is pseudocode for a function LevenshteinDistance that takes two strings,s of length m,and t of length n,and computes the Levenshtein distance between them:
//此处有一个名为:LevenshteinDistance 的函数,省略,请翻译下面
Two examples of the resulting matrix (the minimum steps to be taken are highlighted):
//此处有连个图形表格,省略,请翻译下面
The invariant maintained throughout the algorithm is that we can transform the initial segment s[1..i] into t[1..j] using a minimum of d[i,j] operations.At the end,the bottom-right element of the array contains the answer.