Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 730. Count Different Palindromic Subsequences
Count the number of distinct non-empty palindromic subsequences in a string (n ≤ 1000, alphabet {a,b,c,d}), returning the result modulo 1e9+7. The core challenge is using interval dynamic programming with careful deduplication of subsequences to avoid overcounting repeated characters.
Asked at:
Salesforce
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early May, 2025
Salesforce
Senior
Write a function to count how many palindromic substrings there are in a certain string
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.