Problem 828 · Hard

Count Unique Characters of All Substrings of a Given String

Count each character occurrence by how many substrings contain it as their only copy.

Open the interactive visualisation