题目 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 分析 求给定字符串的最长回文子串. 这道题有下面三种解决思路: 暴力法,二层遍历,判断[i,j]子串是否回文,且同时记录最长长度: 显然的,暴力…