Skip to content

Commit e90ae4f

Browse files
committed
공간복잡도 변경
1 parent 115c137 commit e90ae4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

design-add-and-search-words-data-structure/sonjh1217.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class WordDictionary {
2525
node.isEndOfWord = true
2626
}
2727

28-
// O(m) ~ O(26^m) time / O(1) space
28+
// O(m) ~ O(26^m) time / O(m) space
2929
func search(_ word: String) -> Bool {
3030
return dfs(word: Array(word), index: 0, node: root)
3131
}

0 commit comments

Comments
 (0)