MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Search

Method Search

implement_trie_208/solution.go:42–44  ·  view source on GitHub ↗

Returns true if the word is in the trie

(word string)

Source from the content-addressed store, hash-verified

40
41// Returns true if the word is in the trie
42func (this *Trie) Search(word string) bool {
43 return this.search(word, true)
44}
45
46// Returns true if there is any word in the trie that starts with the given prefix
47func (this *Trie) StartsWith(prefix string) bool {

Callers 3

TestTrieFunction · 0.80
SetMethod · 0.80
GetMethod · 0.80

Calls 1

searchMethod · 0.95

Tested by 1

TestTrieFunction · 0.64