Available question text
Count the number of ways to split string s into k contiguous substrings (each length ≥ minLength) such that every substring starts with a prime digit (2,3,5,7) and ends with a non-prime digit, returning the count modulo 1e9+7. This is typically solved with dynamic programming over positions and remaining parts (n ≤ 1000) using precomputed valid cut positions to enforce the start/end and length constraints.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2478. Number of Beautiful Partitions
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source