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.

做这道题之前要先了解什么是回文子串。回文串通俗的解释是,分别从字符串两端开始遍历,得到的结果相同,如“abba”,从两端的遍历结果都是:“abba”。

下面是代码实现:

【leetcode-5】Longest palindromic substring 最长回文子串

【leetcode-5】Longest palindromic substring 最长回文子串

相关文章:

  • 2022-12-23
  • 2022-02-14
  • 2021-06-05
  • 2021-12-15
  • 2021-05-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
猜你喜欢
  • 2022-01-16
  • 2021-05-28
  • 2022-01-11
  • 2022-12-23
  • 2021-10-20
  • 2021-11-05
  • 2022-12-23
相关资源
相似解决方案