Problem 1180 · Easy

Count Substrings with Only One Distinct Letter

Count every substring made of a single repeated letter. The visual splits the text into runs of equal letters and shows how a run of length L contributes its triangular count.

Open the interactive visualisation