Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Calculate the frequency of each substring of length <code>k</code> that starts at an index that is divisible by <code>k</code>.
The period of the final string will be the substring with the highest frequency.