Count Palindromic Subsequences at Citadel
Hard41.0% acceptance
This problem has 100.0% frequency at Citadel.
Problem Description
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 tha...
Read full problem and hintsTopics
Also asked at 10 companies
More Citadel Questions
Palindromic SubstringsMediumBest Time to Buy and Sell StockEasyMaximum Total Damage With Spell CastingMediumMaximum Length of Repeated SubarrayMediumLongest String ChainMedium
View all Citadel questions