
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Could you solve the problem if you knew how many digits the total number of parts has?
Try all possible lengths of the total number of parts, and see if the string can be split such that the total number of parts has that length.
Binary search can be used for each part length to find the precise number of parts needed.