LeetCode 刷题记录: 5. Longest Palindromic Substring [Python]

原题

https://leetcode.com/problems/longest-palindromic-substring/

Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.

思路

马拉车方法 (Manacher’s Algorithm) 利用回文的性质减少运算。

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×