mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
28 lines
756 B
HTML
28 lines
756 B
HTML
<p>给你一个字符串 <code>s</code> ,仅反转字符串中的所有元音字母,并返回结果字符串。</p>
|
||
|
||
<p>元音字母包括 <code>'a'</code>、<code>'e'</code>、<code>'i'</code>、<code>'o'</code>、<code>'u'</code>,且可能以大小写两种形式出现。</p>
|
||
|
||
<p> </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> </p>
|
||
|
||
<p><strong>提示:</strong></p>
|
||
|
||
<ul>
|
||
<li><code>1 <= s.length <= 3 * 10<sup>5</sup></code></li>
|
||
<li><code>s</code> 由 <strong>可打印的 ASCII</strong> 字符组成</li>
|
||
</ul>
|