Delete String
Given 2 strings determine the minimum cost required to delete characters from either string to make them equal. We also assign a particular cost to each character so that in order to remove one instance of that character from either string it will inccur that cost. Only lower-case English letters will be used. The answer is guarenteed to fit in a 32-bit integer.
costs = [1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] s1 = abb s2 = bba
2
We can remove a from both string to make bb in both strings with only a cost of 2.