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.
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.