[LeetCode] 5. Longest Palindromic Substring [Medium]
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example 1:
Example 2:
Analyse:
新增一個function用來回傳從位子x, y開始, 最長的palindromic string, x -=1, y +=1. 利用迴圈依次檢查單數與雙數字元的string.
Solution:
Previous[LeetCode] 3. Longest Substring Without Repeating Characters [Medium]Next[LeetCode] 7. Reverse Integer [Easy] [LeetCode]
Last updated