Count Vowels
Easy
Strings
String
Given a string, count the number of vowels (a, e, i, o, u) — case-insensitive.
Constraints
1 ≤ s.length ≤ 10^5
Examples
Example 1:
Input: Hello World
Output: 3
Example 2:
Input: aeiou
Output: 5
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console