Search
⌘K

Leetcode 1332. Remove Palindromic Subsequences

Given a string s containing only 'a' and 'b', find the minimum number of palindromic subsequence removals (subsequences need not be contiguous) required to delete all characters. Because subsequences can pick all identical letters, the answer is 0 if s is empty, 1 if s is itself a palindrome, and otherwise 2.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.