Count Of Distinct Palindromic Subsequences
medium
1. You are given a string. 2. You have to print the count of distinct and non-empty palindromic subsequences in the given string. 3. Two sequences s1 and s2 are distinct if here is some i, for which ith character in s1 and s2 are different. Note -> String contains only lowercase letters. -> The answer will be in the integer range only.
Constraints
1 <= length of string <= 10000
Format
Input
A String
Output
An Integer
Example
Sample Input
bccb
Sample Output
6
Question Video