Check If a Word Occurs As a Prefix of Any Word in a Sentence Solutions in GoNumber 1455Difficulty EasyAcceptance 64.6%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode import "strings" func isPrefixOfWord(sentence string, searchWord string) int { for i, v := range strings.Split(sentence, " ") { if strings.HasPrefix(v, searchWord) { return i + 1 } } return -1}package leetcode import "strings" func isPrefixOfWord(sentence string, searchWord string) int { for i, v := range strings.Split(sentence, " ") { if strings.HasPrefix(v, searchWord) { return i + 1 } } return -1 }