Search
⌘K
Get Premium
Leetcode 1416. Restore The Array
Count the number of ways to split a digit string s (no leading zeros) into integers in [1, k], returning the count modulo 1e9+7. This is typically solved with dynamic programming, only considering substrings up to the digit-length of k and rejecting parts with leading zeros or value > k.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.