<h2><a href="https://leetcode.com/problems/longest-repeating-substring/">1062. Longest Repeating Substring</a></h2><h3>Medium</h3><hr><div><p>Given a string <code>s</code>, return <em>the length of the longest repeating substrings</em>. If no repeating substring exists, return <code>0</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre><strong>Input:</strong> s = "abcd"
<strong>Output:</strong> 0
<strong>Explanation: </strong>There is no repeating substring.
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre><strong>Input:</strong> s = "abbaba"
<strong>Output:</strong> 2
<strong>Explanation: </strong>The longest repeating substrings are "ab" and "ba", each of which occurs twice.
</pre>

<p><strong class="example">Example 3:</strong></p>

<pre><strong>Input:</strong> s = "aabcaabdaab"
<strong>Output:</strong> 3
<strong>Explanation: </strong>The longest repeating substring is "aab", which occurs <code>3</code> times.
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= s.length &lt;= 2000</code></li>
	<li><code>s</code> consists of lowercase English letters.</li>
</ul>
</div>