[Leetcode] 5.Longest Palindromic Substring
·
코딩 테스트
1.문제Example 1:Input: s = "babad"Output: "bab"Explanation: "aba" is also a valid answer.Example 2:Input: s = "cbbd"Output: "bb" Constraints:1 s consist of only digits and English letters. 2.풀이class Solution: def longestPalindrome(self, s: str) -> str: max_size = 0 answer = '' def isPalindrome(s: str) -> boolean: left, right = 0, len(s)-1 while left - ..