1.

Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings?(a) 3(b) 4(c) 5(d) 6This question was addressed to me in unit test.My question is taken from Edit Distance Problem in portion Dynamic Programming of Data Structures & Algorithms II

Answer»

The correct ANSWER is (B) 4

The best explanation: “monday” can be converted to “tuesday” by replacing “m” with “t”, “o” with “u”, “n” with “e” and inserting “s” at the APPROPRIATE position. So, the edit distance is 4.



Discussion

No Comment Found

Related InterviewSolutions