mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-08 08:51:42 +08:00
移除零宽空格
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"titleSlug": "shifting-letters",
|
||||
"content": "<p>You are given a string <code>s</code> of lowercase English letters and an integer array <code>shifts</code> of the same length.</p>\n\n<p>Call the <code>shift()</code> of a letter, the next letter in the alphabet, (wrapping around so that <code>'z'</code> becomes <code>'a'</code>).</p>\n\n<ul>\n\t<li>For example, <code>shift('a') = 'b'</code>, <code>shift('t') = 'u'</code>, and <code>shift('z') = 'a'</code>.</li>\n</ul>\n\n<p>Now for each <code>shifts[i] = x</code>, we want to shift the first <code>i + 1</code> letters of <code>s</code>, <code>x</code> times.</p>\n\n<p>Return <em>the final string after all such shifts to s are applied</em>.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "abc", shifts = [3,5,9]\n<strong>Output:</strong> "rpl"\n<strong>Explanation:</strong> We start with "abc".\nAfter shifting the first 1 letters of s by 3, we have "dbc".\nAfter shifting the first 2 letters of s by 5, we have "igc".\nAfter shifting the first 3 letters of s by 9, we have "rpl", the answer.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "aaa", shifts = [1,2,3]\n<strong>Output:</strong> "gfd"\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>5</sup></code></li>\n\t<li><code>s</code> consists of lowercase English letters.</li>\n\t<li><code>shifts.length == s.length</code></li>\n\t<li><code>0 <= shifts[i] <= 10<sup>9</sup></code></li>\n</ul>\n",
|
||||
"translatedTitle": "字母移位",
|
||||
"translatedContent": "<p>有一个由小写字母组成的字符串 <code>s</code>,和一个长度相同的整数数组 <code>shifts</code>。</p>\n\n<p>我们将字母表中的下一个字母称为原字母的 <em>移位</em> <code>shift()</code> (由于字母表是环绕的, <code>'z'</code> 将会变成 <code>'a'</code>)。</p>\n\n<ul>\n\t<li>例如,<code>shift('a') = 'b'<font color=\"#333333\"><font face=\"Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"font-size:14px\"><span style=\"background-color:#ffffff\">, </span></span></font></font></code><code>shift('t') = 'u'</code>, 以及 <code>shift('z') = 'a'</code>。</li>\n</ul>\n\n<p>对于每个 <code>shifts[i] = x</code> , 我们会将 <code>s</code> 中的前 <code>i + 1</code> 个字母移位 <code>x</code> 次。</p>\n\n<p>返回 <em>将所有这些移位都应用到 <code>s</code> 后最终得到的字符串</em> 。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"abc\", shifts = [3,5,9]\n<strong>输出:</strong>\"rpl\"\n<strong>解释: </strong>\n我们以 \"abc\" 开始。\n将 S 中的第 1 个字母移位 3 次后,我们得到 \"dbc\"。\n再将 S 中的前 2 个字母移位 5 次后,我们得到 \"igc\"。\n最后将 S 中的这 3 个字母移位 9 次后,我们得到答案 \"rpl\"。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> s = \"aaa\", shifts = [1,2,3]\n<strong>输出:</strong> \"gfd\"\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>5</sup></code></li>\n\t<li><code>s</code> 由小写英文字母组成</li>\n\t<li><code>shifts.length == s.length</code></li>\n\t<li><code>0 <= shifts[i] <= 10<sup>9</sup></code></li>\n</ul>\n<span style=\"display:block\"><span style=\"height:0px\"><span style=\"position:absolute\"></span></span></span>",
|
||||
"translatedContent": "<p>有一个由小写字母组成的字符串 <code>s</code>,和一个长度相同的整数数组 <code>shifts</code>。</p>\n\n<p>我们将字母表中的下一个字母称为原字母的 <em>移位</em> <code>shift()</code> (由于字母表是环绕的, <code>'z'</code> 将会变成 <code>'a'</code>)。</p>\n\n<ul>\n\t<li>例如,<code>shift('a') = 'b'<font color=\"#333333\"><font face=\"Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"font-size:14px\"><span style=\"background-color:#ffffff\">, </span></span></font></font></code><code>shift('t') = 'u'</code>, 以及 <code>shift('z') = 'a'</code>。</li>\n</ul>\n\n<p>对于每个 <code>shifts[i] = x</code> , 我们会将 <code>s</code> 中的前 <code>i + 1</code> 个字母移位 <code>x</code> 次。</p>\n\n<p>返回 <em>将所有这些移位都应用到 <code>s</code> 后最终得到的字符串</em> 。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"abc\", shifts = [3,5,9]\n<strong>输出:</strong>\"rpl\"\n<strong>解释: </strong>\n我们以 \"abc\" 开始。\n将 S 中的第 1 个字母移位 3 次后,我们得到 \"dbc\"。\n再将 S 中的前 2 个字母移位 5 次后,我们得到 \"igc\"。\n最后将 S 中的这 3 个字母移位 9 次后,我们得到答案 \"rpl\"。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> s = \"aaa\", shifts = [1,2,3]\n<strong>输出:</strong> \"gfd\"\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>5</sup></code></li>\n\t<li><code>s</code> 由小写英文字母组成</li>\n\t<li><code>shifts.length == s.length</code></li>\n\t<li><code>0 <= shifts[i] <= 10<sup>9</sup></code></li>\n</ul>\n<span style=\"display:block\"><span style=\"height:0px\"><span style=\"position:absolute\"></span></span></span>",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 80,
|
||||
|
Reference in New Issue
Block a user