1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-19 12:06:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:43:11 +08:00
parent 58bbdfd57c
commit 2b0511d272
10721 changed files with 8123 additions and 8119 deletions

View File

@@ -0,0 +1,29 @@
<p>给定一个字符串<meta charset="UTF-8" />&nbsp;<code>s</code>&nbsp;,你需要反转字符串中每个单词的字符顺序,同时仍保留空格和单词的初始顺序。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>s = "Let's take LeetCode contest"
<strong>输出:</strong>"s'teL ekat edoCteeL tsetnoc"
</pre>
<p><strong>示例 2:</strong></p>
<pre>
<strong>输入:</strong> s = "God Ding"
<strong>输出:</strong>"doG gniD"
</pre>
<p>&nbsp;</p>
<p><strong><strong><strong><strong>提示:</strong></strong></strong></strong></p>
<ul>
<li><code>1 &lt;= s.length &lt;= 5 * 10<sup>4</sup></code></li>
<li><meta charset="UTF-8" /><code>s</code>&nbsp;包含可打印的 <strong>ASCII</strong> 字符。</li>
<li><meta charset="UTF-8" /><code>s</code>&nbsp;不包含任何开头或结尾空格。</li>
<li><meta charset="UTF-8" /><code>s</code>&nbsp;<strong>至少</strong> 有一个词。</li>
<li><meta charset="UTF-8" /><code>s</code>&nbsp;中的所有单词都用一个空格隔开。</li>
</ul>