1332. Remove Palindromic Subsequences---->Simple and liner line code

class Solution {
public int removePalindromeSub(String s) {
return s.isEmpty() ? 0 : (s.equals(new StringBuilder(s).reverse().toString()) ? 1:2);
}
}

Comments (0)