2025-08-02 18:49:48 +0300 MSK

Remove Palindromic Subsequences

Code

class Solution:
    def removePalindromeSub(self, s: str) -> int:
        if s == s[::-1]:
            return 1
        return 2