1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 19:31:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part6

This commit is contained in:
2022-03-27 20:56:26 +08:00
parent c11d601602
commit 08d1f2a596
1096 changed files with 88216 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
<p>给你一个以字符串表示的非负整数 <code>num</code> 和一个整数 <code>k</code> ,移除这个数中的 <code>k</code><em> </em>位数字,使得剩下的数字最小。请你以字符串形式返回这个最小的数字。</p>
 
<p><strong>示例 1 </strong></p>
<pre>
<strong>输入:</strong>num = "1432219", k = 3
<strong>输出:</strong>"1219"
<strong>解释:</strong>移除掉三个数字 4, 3, 和 2 形成一个新的最小的数字 1219 。
</pre>
<p><strong>示例 2 </strong></p>
<pre>
<strong>输入:</strong>num = "10200", k = 1
<strong>输出:</strong>"200"
<strong>解释:</strong>移掉首位的 1 剩下的数字为 200. 注意输出不能有任何前导零。
</pre>
<p><strong>示例 3 </strong></p>
<pre>
<strong>输入:</strong>num = "10", k = 2
<strong>输出:</strong>"0"
<strong>解释:</strong>从原数字移除所有的数字,剩余为空就是 0 。
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 <= k <= num.length <= 10<sup>5</sup></code></li>
<li><code>num</code> 仅由若干位数字0 - 9组成</li>
<li>除了 <strong>0</strong> 本身之外,<code>num</code> 不含任何前导零</li>
</ul>