Palindromic Substrings
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings even they consist of same characters.
Example
Example1
Example2
Notice
The input string length won't exceed 1000
分析
以中间2位向两边扩展,注意判断left, right 是在范围内
Last updated
Was this helpful?