File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ public class Trie {
103
103
self . wordList = [ ]
104
104
105
105
for word in wordList {
106
- let op = self . insert ( word)
106
+ self . insert ( word)
107
107
}
108
108
}
109
109
@@ -205,23 +205,17 @@ public class Trie {
205
205
currentNode = currentNode. getChildAt ( String ( c) )
206
206
}
207
207
208
- print ( " I make it here " + w)
209
208
if currentNode. numChildren ( ) > 0 {
210
- //print("Hello?")
211
209
currentNode. isNotWord ( )
212
210
} else {
213
211
var character = currentNode. char ( )
214
- var i = 0
215
212
while ( currentNode. numChildren ( ) == 0 && !currentNode. isRoot ( ) ) {
216
- print ( " Do I die here? " )
217
213
print ( currentNode. getParent ( ) . char ( ) )
218
- i+= 1
219
214
currentNode = currentNode. getParent ( )
220
215
currentNode. children [ character] !. setParent ( nil )
221
216
currentNode. children [ character] !. update ( nil )
222
217
currentNode. children [ character] = nil
223
218
character = currentNode. char ( )
224
- print ( i)
225
219
}
226
220
}
227
221
You can’t perform that action at this time.
0 commit comments