The constraints are very low which give us a good opportunity to get the task accepted with a simple brute force. Simple build the first string and every time remove the first letter and add it from the back and you will get the next string. Repeat the process until the new string gets equal to the initial string.
No comments:
Post a Comment