The following program calculates the edit distance between two strings