Leetcode5 Longest Palindromic Substrings
题目描述
1 | Given a string s, find the longest palindromic substring in s. |
思路
如果len为n的string是回文字符那么长度为n-2的string也是回文字符。
abcbc -> bcb->c
abba -> bb
代码
1 | class Solution { |
1 | Given a string s, find the longest palindromic substring in s. |
如果len为n的string是回文字符那么长度为n-2的string也是回文字符。
abcbc -> bcb->c
abba -> bb
1 | class Solution { |
Welcome to my other publishing channels