File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -38,28 +38,6 @@ func (t *Trie) insert(letters, value string) {
38
38
}
39
39
}
40
40
41
- // Search for a string in the Trie.
42
- //
43
- // Returns the corresponding array of strings if found,
44
- // or an empty array otherwise.
45
- func (t * Trie ) search (srch string ) (found []string ) {
46
- srchRune := []rune (srch )
47
-
48
- for l , letter := range srchRune {
49
- letterString := string (letter )
50
- if t .children [letterString ] != nil {
51
- t = t .children [letterString ]
52
- } else {
53
- found = []string {"" }
54
- return found
55
- }
56
- if l == len (srchRune )- 1 {
57
- found = t .values
58
- }
59
- }
60
- return found
61
- }
62
-
63
41
// Convert a given string to the corresponding values
64
42
// in the trie. This performed in a greedy fashion,
65
43
// replacing the longest valid string it can find at any
You can’t perform that action at this time.
0 commit comments