Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2734cd6

Browse files
Create 3227. Vowels Game in a String.cpp
1 parent c753d6c commit 2734cd6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class Solution {
2+
public:
3+
bool isvowel(char c){
4+
if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u') return true;
5+
return false;
6+
}
7+
bool doesAliceWin(string s) {
8+
int n =s.size();
9+
int count = 0;
10+
for(int i=0;i<n;i++){
11+
if(isvowel(s[i])) count++;
12+
}
13+
if(count==0) return false;
14+
return true;
15+
16+
}
17+
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /