Problem 2083 · Medium

Substrings That Begin and End With the Same Letter

Count substrings whose first and last characters match.

Open the interactive visualisation