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

批量更新数据

This commit is contained in:
2025-01-09 20:29:41 +08:00
parent 04ecea043d
commit 48cdd06c2b
5053 changed files with 156164 additions and 135322 deletions

View File

@@ -15,12 +15,13 @@
<p><strong>示例 1</strong></p>
<pre><b>输入:</b>mapping = [8,9,4,0,2,1,3,5,7,6], nums = [991,338,38]
<pre>
<b>输入:</b>mapping = [8,9,4,0,2,1,3,5,7,6], nums = [991,338,38]
<b>输出:</b>[338,38,991]
<b>解释:</b>
将数字 991 按照如下规则映射:
1. mapping[9] = 6 ,所有数位 9 都会变成 6 。
2. mapping[1] = 9 ,所有数位 1 都会变成 8
2. mapping[1] = 9 ,所有数位 1 都会变成 9
所以991 映射的值为 669 。
338 映射为 007 ,去掉前导 0 后得到 7 。
38 映射为 07 ,去掉前导 0 后得到 7 。
@@ -30,7 +31,8 @@
<p><strong>示例 2</strong></p>
<pre><b>输入:</b>mapping = [0,1,2,3,4,5,6,7,8,9], nums = [789,456,123]
<pre>
<b>输入:</b>mapping = [0,1,2,3,4,5,6,7,8,9], nums = [789,456,123]
<b>输出:</b>[123,456,789]
<b>解释:</b>789 映射为 789 456 映射为 456 123 映射为 123 。所以排序后数组为 [123,456,789] 。
</pre>