LC 2977 - Minimum Cost to Convert String II
Approach This is a really hardr problem, originally I was thinking that for some string like a.. and b.., we must find somethiong to replace the first character, but I did not notice that the problme describe that the changing substring cannot be overlap (it can only be seperate or the same range). I originally think that ace as source and bcd as target, we might have a cost like ce to ed and aed to bcd, then we can combine both to transit to the target. ...