Class Solution
java.lang.Object
g0401_0500.s0459_repeated_substring_pattern.Solution
459 - Repeated Substring Pattern.<p>Easy</p>
<p>Given a string <code>s</code>, check if it can be constructed by taking a substring of it and appending multiple copies of the substring together.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = “abab”</p>
<p><strong>Output:</strong> true</p>
<p><strong>Explanation:</strong> It is the substring “ab” twice.</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = “aba”</p>
<p><strong>Output:</strong> false</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> s = “abcabcabcabc”</p>
<p><strong>Output:</strong> true</p>
<p><strong>Explanation:</strong> It is the substring “abc” four times or the substring “abcabc” twice.</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= s.length <= 10<sup>4</sup></code></li>
<li><code>s</code> consists of lowercase English letters.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
repeatedSubstringPattern
-