3784. Minimum Deletion Cost to Make All Characters Equal
You are given a string
sof lengthnand an integer arraycostof the same length, wherecost[i]is the cost to delete thei^thcharacter ofs.You may delete any number of characters from
s(possibly none), such that the resulting string is non-empty and consists of equal characters.Return an integer denoting the minimum total deletion cost required.
1 | class Solution { |