leetcode 647 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 1:
1 | Input: "abc" |
Example 2:
1 | Input: "aaa" |
solution one
expand around center
1 | class Solution{ |
solution two
dp
1 | class Solution { |