mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			812 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			812 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>输入一个非负整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre><strong>输入:</strong> <code>[10,2]</code>
 | 
						||
<strong>输出:</strong> "<code>102"</code></pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre><strong>输入:</strong> <code>[3,30,34,5,9]</code>
 | 
						||
<strong>输出:</strong> "<code>3033459"</code></pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>0 < nums.length <= 100</code></li>
 | 
						||
</ul>
 | 
						||
 | 
						||
<p><strong>说明: </strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li>输出结果可能非常大,所以你需要返回一个字符串而不是整数</li>
 | 
						||
	<li>拼接起来的数字可能会有前导 0,最后结果不需要去掉前导 0</li>
 | 
						||
</ul>
 |