You are given a word and an integer k.
Every second, you must perform the following operation:
Remove the first k characters from word.
Append any k lowercase English characters to the end of word.
Return the minimum time greater than word to return to its original state.
Note: You can choose any characters to append at each step, and it is not required that they match the characters that were removed.
Constraints:
word.length
k word.length
word consists only of lowercase English letters.
You are given a word and an integer k.
Every second, you must perform the following operation:
Remove the first k characters from word.
Append any k lowercase English characters to the end of word.
Return the minimum time greater than word to return to its original state.
Note: You can choose any characters to append at each step, and it is not required that they match the characters that were removed.
Constraints:
word.length
k word.length
word consists only of lowercase English letters.