




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Given a substring of the text, how to check if it can be written as the concatenation of a string with itself ?
We can do that in linear time, a faster way is to use hashing.
Try all substrings and use hashing to check them.