Skip to content

Commit d531d5e

Browse files
committed
update comment on design-add-and-search-words-data-structure
1 parent 20e96ce commit d531d5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

design-add-and-search-words-data-structure/gitsunmin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
* time complexity:
77
* - addWord: O(m)
88
* - search: O(26^m) in the worst case (with multiple wildcards) to O(m) in general cases.
9-
* space complexity: O(n * m)
9+
* space complexity:
10+
* - addWord: O(n * m)
11+
* - search: O(n * m)
1012
*/
1113
class TrieNode {
1214
children: Map<string, TrieNode>;

0 commit comments

Comments
 (0)