You are given a string message and an integer limit.
You need to split message into "<i/k>", where:
k represents the total number of parts into which the message is divided.
i represents the
The splitting must satisfy the following conditions:
The total length of each part, including its appended suffix, is at most limit.
Concatenating the contents of all message.
The total number of parts
Return an array of strings representing the split parts in order. If it is impossible to split message to satisfy all conditions, return an empty array.
Constraints:
message.length
message consists only of lowercase English letters and ' '.
limit
You are given a string message and an integer limit.
You need to split message into "<i/k>", where:
k represents the total number of parts into which the message is divided.
i represents the
The splitting must satisfy the following conditions:
The total length of each part, including its appended suffix, is at most limit.
Concatenating the contents of all message.
The total number of parts
Return an array of strings representing the split parts in order. If it is impossible to split message to satisfy all conditions, return an empty array.
Constraints:
message.length
message consists only of lowercase English letters and ' '.
limit