LeetCode
Count Different Palindromic Subsequences
Click
here
for an explanation.