1.

In which of the following cases will the edit distance between two strings be zero?(a) When one string is a substring of another(b) When the lengths of the two strings are equal(c) When the two strings are equal(d) The edit distance can never be zeroThe question was posed to me in examination.Asked question is from Edit Distance Problem topic in chapter Dynamic Programming of Data Structures & Algorithms II

Answer»

Correct OPTION is (c) When the two STRINGS are equal

For EXPLANATION: The EDIT distance will be zero only when the two strings are equal.



Discussion

No Comment Found

Related InterviewSolutions