You are given a string s consisting of digits and an integer k.
A partition of s is called valid if the numeric value of each contiguous substring in the partition is at most k.
Return the minimum number of substrings in a valid partition of s. If it is impossible to partition s such that every substring has a value at most k, return
Constraints:
s.length
s[i] is a digit from
k
You are given a string s consisting of digits and an integer k.
A partition of s is called valid if the numeric value of each contiguous substring in the partition is at most k.
Return the minimum number of substrings in a valid partition of s. If it is impossible to partition s such that every substring has a value at most k, return
Constraints:
s.length
s[i] is a digit from
k