Skip to content

Commit 8d0a20c

Browse files
author
Thukor
committed
Got rid of unnecessary debugging print statements and variable declarations.
1 parent 6ec2d66 commit 8d0a20c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Trie/trie.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class Trie {
103103
self.wordList = []
104104

105105
for word in wordList {
106-
let op = self.insert(word)
106+
self.insert(word)
107107
}
108108
}
109109

@@ -205,23 +205,17 @@ public class Trie {
205205
currentNode = currentNode.getChildAt(String(c))
206206
}
207207

208-
print("I make it here " + w)
209208
if currentNode.numChildren() > 0 {
210-
//print("Hello?")
211209
currentNode.isNotWord()
212210
} else {
213211
var character = currentNode.char()
214-
var i = 0
215212
while(currentNode.numChildren() == 0 && !currentNode.isRoot()) {
216-
print("Do I die here?")
217213
print(currentNode.getParent().char())
218-
i+=1
219214
currentNode = currentNode.getParent()
220215
currentNode.children[character]!.setParent(nil)
221216
currentNode.children[character]!.update(nil)
222217
currentNode.children[character] = nil
223218
character = currentNode.char()
224-
print(i)
225219
}
226220
}
227221

0 commit comments

Comments
 (0)