[LeetCode] Count Palindromic Subsequences

1 · · Nov. 27, 2022, 5:42 a.m.
Summary
2484. Count Palindromic Subsequences Given a string of digits s, return the number of palindromic subsequences of s having length 5. Since the answer may be very large, return it modulo 109 + 7. Note: A string is palindromic if it reads the same forward and backward. A subsequence is a string that can be derived from another string by deleting some or no characters without changing the order of the remaining characters. ...