Question: Algorithms Question Given two strings X = x_1x_2...x_m and Y = y_1y_2...y_n, let deleteScore (X, Y) be the least number of characters you have to
Algorithms Question

Given two strings X = x_1x_2...x_m and Y = y_1y_2...y_n, let deleteScore (X, Y) be the least number of characters you have to delete from X, Y so that you get two same strings. For example, if X = goodman and Y = goldmann, then deleteScore(X, Y) = 3 (you can delete 'o' from X, '1' and one 'n' from Y to get the same string - "godman"). Give an algorithm that given two strings X, Y computes deletescore(X, Y). For full-credit, your algorithm should run in polynomial time. (Example: On input X = goodman, Y = goldmann your output should be 3.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
