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 hints

Topics

Also asked at 10 companies


More Citadel Questions

View all Citadel questions