mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			842 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			842 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给你一个混合字符串 <code>s</code> ,请你返回 <code>s</code> 中 <strong>第二大 </strong>的数字,如果不存在第二大的数字,请你返回 <code>-1</code> 。</p>
 | 
						||
 | 
						||
<p><strong>混合字符串 </strong>由小写英文字母和数字组成。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<b>输入:</b>s = "dfa12321afd"
 | 
						||
<b>输出:</b>2
 | 
						||
<b>解释:</b>出现在 s 中的数字包括 [1, 2, 3] 。第二大的数字是 2 。
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<b>输入:</b>s = "abc1111"
 | 
						||
<b>输出:</b>-1
 | 
						||
<b>解释:</b>出现在 s 中的数字只包含 [1] 。没有第二大的数字。
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>1 <= s.length <= 500</code></li>
 | 
						||
	<li><code>s</code> 只包含小写英文字母和(或)数字。</li>
 | 
						||
</ul>
 |