mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			741 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			741 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给你一个字符串 <code>s</code> ,找出它的所有子串并按字典序排列,返回排在最后的那个子串。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>s = "abab"
 | 
						||
<strong>输出:</strong>"bab"
 | 
						||
<strong>解释:</strong>我们可以找出 7 个子串 ["a", "ab", "aba", "abab", "b", "ba", "bab"]。按字典序排在最后的子串是 "bab"。
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>s = "leetcode"
 | 
						||
<strong>输出:</strong>"tcode"
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>1 <= s.length <= 4 * 10<sup>5</sup></code></li>
 | 
						||
	<li><code>s</code> 仅含有小写英文字符。</li>
 | 
						||
</ul>
 |