desc.html 822 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<p>给你一个字符串&nbsp;<code>s</code>,找出它的所有子串并按字典序排列,返回排在最后的那个子串。</p>

<p>&nbsp;</p>

<p><strong>示例 1:</strong></p>

<pre><strong>输入:</strong>&quot;abab&quot;
<strong>输出:</strong>&quot;bab&quot;
<strong>解释:</strong>我们可以找出 7 个子串 [&quot;a&quot;, &quot;ab&quot;, &quot;aba&quot;, &quot;abab&quot;, &quot;b&quot;, &quot;ba&quot;, &quot;bab&quot;]。按字典序排在最后的子串是 &quot;bab&quot;
</pre>

<p><strong>示例&nbsp;2:</strong></p>

<pre><strong>输入:</strong>&quot;leetcode&quot;
<strong>输出:</strong>&quot;tcode&quot;
</pre>

<p>&nbsp;</p>

<p><strong>提示:</strong></p>

<ol>
	<li><code>1 &lt;= s.length &lt;= 4 * 10^5</code></li>
	<li>s 仅含有小写英文字符。</li>
</ol>