Given a string and multiple 1-indexed range queries [L, R], count how many substrings entirely within the range [L, R] have identical starting and ending characters.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.