Created
September 12, 2025 08:02
-
-
Save SuryaPratapK/27253a253306c798e83f5a991abc95ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution { | |
| public: | |
| bool doesAliceWin(string s) { | |
| for(int i=0;i<s.size();++i) | |
| if(s[i]=='a' or s[i]=='e' or s[i]=='i' or s[i]=='o' or s[i]=='u') | |
| return true; | |
| return false; | |
| } | |
| }; | |
| /* | |
| // Java | |
| class Solution { | |
| public boolean doesAliceWin(String s) { | |
| for (int i = 0; i < s.length(); ++i) { | |
| char c = s.charAt(i); | |
| if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') | |
| return true; | |
| } | |
| return false; | |
| } | |
| } | |
| # Python | |
| class Solution: | |
| def doesAliceWin(self, s: str) -> bool: | |
| for ch in s: | |
| if ch in ('a', 'e', 'i', 'o', 'u'): | |
| return True | |
| return False | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment