Minimum Deletion Cost to Avoid Repeating Letters(LeetCode 1578):

Problem