Count Palindromic Substrings

Given a string s consisting only of lowercase English letters, return the total number of palindromic substrings in s.

A substring must be contiguous. Substrings with different start or end i...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: