Longest Palindromic Substring https://leetcode.com/problems/longest-palindromic-substring/ Total Accepted: 71879 Total Submissions: 343504 Difficulty: Medium 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. Code: class Solution(object): def longestPalindrome(self, s): “”” :type s: str :rtype: str “”” …
Continue reading “Leetcode 5: Longest Palindromic Substring”