This is Minimum ASCII Delete Sum from LeetCode. Given two strings, find the minimum sum of ASCII values of deleted characters to make them equal. For "sea" and "eat", delete 's' (115) from "sea" and 't' (116) from "eat". Total: 231. This is weighted Edit Distance.
Instead of counting operations, you're reducing the cost based on character values. Before reading the solution, try to identify the base case and recursive relationship yourself.