Medium
Count all palindromic substrings.
Return the total number of palindromic substrings in the string.
Examples
Input: s = "aaa"
Output: 6
Constraints
- 1 <= s.length
Coding Challenge
Count all palindromic substrings.
Return the total number of palindromic substrings in the string.
Input: s = "aaa"
Output: 6
Preparing your coding workspace...