Problem 3784 · Medium

Minimum Deletion Cost to Make All Characters Equal

Keep the letter whose total deletion cost is largest and delete every other character.

Open the interactive visualisation