mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-14 03:41:41 +08:00
add leetcode problem-cn part6
This commit is contained in:
27
算法题(国内版)/problem (Chinese)/最大数 [largest-number].html
Normal file
27
算法题(国内版)/problem (Chinese)/最大数 [largest-number].html
Normal file
@@ -0,0 +1,27 @@
|
||||
<p>给定一组非负整数 <code>nums</code>,重新排列每个数的顺序(每个数不可拆分)使之组成一个最大的整数。</p>
|
||||
|
||||
<p><strong>注意:</strong>输出结果可能非常大,所以你需要返回一个字符串而不是整数。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入<code>:</code></strong><code>nums = [10,2]</code>
|
||||
<strong>输出:</strong><code>"210"</code></pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入<code>:</code></strong><code>nums = [3,30,34,5,9]</code>
|
||||
<strong>输出:</strong><code>"9534330"</code>
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= nums.length <= 100</code></li>
|
||||
<li><code>0 <= nums[i] <= 10<sup>9</sup></code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user