Skip to content

Commit b2060e1

Browse files
Added README.md file for Find the Longest Substring Containing Vowels in Even Counts
1 parent 22a96f8 commit b2060e1

File tree

1 file changed

+34
-0
lines changed
  • 1473-find-the-longest-substring-containing-vowels-in-even-counts

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<h2><a href="https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts">Find the Longest Substring Containing Vowels in Even Counts</a></h2> <img src='https://img.shields.io/badge/Difficulty-Medium-orange' alt='Difficulty: Medium' /><hr><p>Given the string <code>s</code>, return the size of the longest substring containing each vowel an even number of times. That is, &#39;a&#39;, &#39;e&#39;, &#39;i&#39;, &#39;o&#39;, and &#39;u&#39; must appear an even number of times.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre>
7+
<strong>Input:</strong> s = &quot;eleetminicoworoep&quot;
8+
<strong>Output:</strong> 13
9+
<strong>Explanation: </strong>The longest substring is &quot;leetminicowor&quot; which contains two each of the vowels: <strong>e</strong>, <strong>i</strong> and <strong>o</strong> and zero of the vowels: <strong>a</strong> and <strong>u</strong>.
10+
</pre>
11+
12+
<p><strong class="example">Example 2:</strong></p>
13+
14+
<pre>
15+
<strong>Input:</strong> s = &quot;leetcodeisgreat&quot;
16+
<strong>Output:</strong> 5
17+
<strong>Explanation:</strong> The longest substring is &quot;leetc&quot; which contains two e&#39;s.
18+
</pre>
19+
20+
<p><strong class="example">Example 3:</strong></p>
21+
22+
<pre>
23+
<strong>Input:</strong> s = &quot;bcbcbc&quot;
24+
<strong>Output:</strong> 6
25+
<strong>Explanation:</strong> In this case, the given string &quot;bcbcbc&quot; is the longest because all vowels: <strong>a</strong>, <strong>e</strong>, <strong>i</strong>, <strong>o</strong> and <strong>u</strong> appear zero times.
26+
</pre>
27+
28+
<p>&nbsp;</p>
29+
<p><strong>Constraints:</strong></p>
30+
31+
<ul>
32+
<li><code>1 &lt;= s.length &lt;= 5 x 10^5</code></li>
33+
<li><code>s</code>&nbsp;contains only lowercase English letters.</li>
34+
</ul>

0 commit comments

Comments
 (0)