Question: stringAlignment (String x, String y). Assume that x is a string of length n and y is a string of length m such that n

stringAlignment (String x, String y). Assume that x is a string of length n and y is a string of length m such that n greaterthanorequalto m. This method returns a string z (obtained by inserting $ at n - m indices in y) such that AlignCost(x, z) lessthanorequalto AlignCost(x, z') over all possible z' (obtained by inserting n - m many $'s in y). You may assume that length of x is at least the length of y and neither of x or y has the character $. Note that the length of the returned string z must equal the length of x
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
