Skip to content

Commit 81da1d5

Browse files
committed
docs: update description to lc problem No.0557
No.0557.Reverse Words in a String III
1 parent d6c66fa commit 81da1d5

File tree

1 file changed

+17
-5
lines changed
  • solution/0500-0599/0557.Reverse Words in a String III

1 file changed

+17
-5
lines changed

solution/0500-0599/0557.Reverse Words in a String III/README.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,34 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>给定一个字符串,你需要反转字符串中每个单词的字符顺序,同时仍保留空格和单词的初始顺序。</p>
9+
<p>给定一个字符串<meta charset=\"UTF-8\" />&nbsp;<code>s</code>&nbsp;,你需要反转字符串中每个单词的字符顺序,同时仍保留空格和单词的初始顺序。</p>
1010

1111
<p>&nbsp;</p>
1212

13-
<p><strong>示例:</strong></p>
13+
<p><strong>示例 1:</strong></p>
1414

15-
<pre><strong>输入:</strong>&quot;Let&#39;s take LeetCode contest&quot;
16-
<strong>输出:</strong>&quot;s&#39;teL ekat edoCteeL tsetnoc&quot;
15+
<pre>
16+
<strong>输入:</strong>s = "Let's take LeetCode contest"
17+
<strong>输出:</strong>"s'teL ekat edoCteeL tsetnoc"
18+
</pre>
19+
20+
<p><strong>示例 2:</strong></p>
21+
22+
<pre>
23+
<strong>输入:</strong> s = "God Ding"
24+
<strong>输出:</strong>"doG gniD"
1725
</pre>
1826

1927
<p>&nbsp;</p>
2028

2129
<p><strong><strong><strong><strong>提示:</strong></strong></strong></strong></p>
2230

2331
<ul>
24-
<li>在字符串中,每个单词由单个空格分隔,并且字符串中不会有任何额外的空格。</li>
32+
<li><code>1 &lt;= s.length &lt;= 5 * 10<sup>4</sup></code></li>
33+
<li><meta charset=\"UTF-8\" /><code>s</code>&nbsp;包含可打印的 <strong>ASCII</strong> 字符。</li>
34+
<li><meta charset=\"UTF-8\" /><code>s</code>&nbsp;不包含任何开头或结尾空格。</li>
35+
<li><meta charset=\"UTF-8\" /><code>s</code>&nbsp;里 <strong>至少</strong> 有一个词。</li>
36+
<li><meta charset=\"UTF-8\" /><code>s</code>&nbsp;中的所有单词都用一个空格隔开。</li>
2537
</ul>
2638

2739
## 解法

0 commit comments

Comments
 (0)