< Ace Coding /> 🚀
ReplySubstrings that begin and end with the same letter
You are given a 0-indexed string s consisting of only lowercase English letters. Return the number of substrings in s that begin and end with the same character.
A substring is a contiguous non-empty sequence of characters within a string.
Exampquestion from today interview question
201 ·