一道难度为medium的题目,原题地址:https://leetcode.com/problems/longest-palindromic-substring/,用动态规划即可解决,但是效率不是特别高,执行时间为93ms。
题目:
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example:
Input: "babad" Output: "bab" Note: "aba" is also a valid answer.
Example:
Input: "cbbd" Output: "bb"