Given a string s made up only of digit characters, count how many subsequences of s form a palindrome of length
Return the total number of such palindromic subsequences.
Note:
A string is palindromic if it reads the same forward and backward.
A subsequence is obtained by deleting zero or more characters from
swithout changing the relative order of the remaining characters.A subsequence is defined by the indices chosen from
s, so identical resulting strings formed from different index selections are counted multiple times.
Constraints:
s.length
s consists of digits.
Given a string s made up only of digit characters, count how many subsequences of s form a palindrome of length
Return the total number of such palindromic subsequences.
Note:
A string is palindromic if it reads the same forward and backward.
A subsequence is obtained by deleting zero or more characters from
swithout changing the relative order of the remaining characters.A subsequence is defined by the indices chosen from
s, so identical resulting strings formed from different index selections are counted multiple times.
Constraints:
s.length
s consists of digits.