1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/反转字符串中的元音字母 [reverse-vowels-of-a-string].html
2022-03-29 12:43:11 +08:00

28 lines
756 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给你一个字符串 <code>s</code> ,仅反转字符串中的所有元音字母,并返回结果字符串。</p>
<p>元音字母包括 <code>'a'</code><code>'e'</code><code>'i'</code><code>'o'</code><code>'u'</code>,且可能以大小写两种形式出现。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>s = "hello"
<strong>输出:</strong>"holle"
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>s = "leetcode"
<strong>输出:</strong>"leotcede"</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= s.length &lt;= 3 * 10<sup>5</sup></code></li>
<li><code>s</code><strong>可打印的 ASCII</strong> 字符组成</li>
</ul>