Practice Problem

Palindromic Substrings

Difficulty: Medium

Given a string, return the number of substrings that are palindromes. Each unique start-end position counts as a different substring even if the characters are the same.