mirror of
https://github.com/lWolvesl/leetcode.git
synced 2026-01-13 02:38:37 +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