1.

For which of the following pairs of strings is the edit distance maximum?(a) sunday & monday(b) monday & tuesday(c) tuesday & wednesday(d) wednesday & thursdayThis question was posed to me during an interview.This interesting question is from Wagner-Fischer Algorithm topic in section Dynamic Programming of Data Structures & Algorithms II

Answer»

Right choice is (d) WEDNESDAY & thursday

The EXPLANATION is: The edit distances are 2, 4, 4 and 5 respectively. Hence, the MAXIMUM edit distance is between the strings wednesday and thursday.



Discussion

No Comment Found

Related InterviewSolutions