[#3227] feat(leetcode): add c# and golang solution

This commit is contained in:
2025-09-12 13:13:22 +08:00
parent 8dfafaaf43
commit 1e562065e8
10 changed files with 561 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
// LeetCode 3227: Vowels Game In A String
// 難度: Medium
// 日期: 2025-09-12
package vowels
import "strings"
// DoesAliceWin returns true if the string contains any vowel.
// Game theory reduces to: Alice wins iff there exists at least one vowel.
func DoesAliceWin(s string) bool {
const vowels = "aeiou"
for _, ch := range s {
if strings.ContainsRune(vowels, ch) {
return true
}
}
return false
}