less than 1 minute read

Given a lowercase alphabet string s, return whether it’s a repeating string.

Constraints

  • n ≤ 100,000 where n is the length of s

https://binarysearch.com/problems/Repeating-String

Examples

Example 1

Input

  • s = dogdogdog

Output

  • answer = True

Explanation

"dog" is repeated.

Example 2

Input

  • s = catdog

Output

  • answer = False

Solution

Leave a comment