Power button [-] 5. Small daily practice palindromic longest substring (Python)

The longest substring palindromic

Topic links: https://leetcode-cn.com/problems/longest-palindromic-substring/
Difficulty: Moderate

Title Description

Given a string s, s to find the longest substring palindromic. You can assume that the maximum length of 1000 s.
Palindromic sequence (palindromic string) refers to whether the string read from left to right or right to read, the read order is the same; in short, the palindromic sequence are symmetrical.

Examples

Example 1:
Input: "Babad"
Output: "BAB"
Note: "aba" is a valid answer.

Example 2:
Input: "cbbd"
Output: "BB"

This is a stupid question, how could not think, here is the link to find online, you can refer to reference, (the first violence law will complain, not through some test cases.)
Code links: HTTPS: //blog.csdn. net / qq_17550379 / article / details / 84022845

Published 44 original articles · won praise 5 · Views 4469

Guess you like

Origin blog.csdn.net/ljb0077/article/details/104709896