Created
January 30, 2020 15:28
-
-
Save Desolve/1739bde8255945c392e5c87dec946573 to your computer and use it in GitHub Desktop.
1332 Remove Palindromic Subsequences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
def removePalindromeSub(self, s: str) -> int: | |
if not s: return 0 | |
if s == s[::-1]: return 1 | |
return 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment