mirror of
https://git.wolves.top/wolves/leetcode.git
synced 2025-11-04 17:26:32 +08:00
init
This commit is contained in:
13
25/05/2942.go
Normal file
13
25/05/2942.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import "strings"
|
||||
|
||||
func findWordsContaining(words []string, x byte) []int {
|
||||
var result []int
|
||||
for i, word := range words {
|
||||
if strings.Index(word, string(x)) != -1 {
|
||||
result = append(result, i)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user