mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
28 lines
794 B
HTML
28 lines
794 B
HTML
<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>
|