We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e0e5b3 commit 73a3a2dCopy full SHA for 73a3a2d
design-add-and-search-words-data-structure/whewchews.ts
@@ -20,7 +20,7 @@ class WordDictionary {
20
}
21
22
// TC: O(m*n) // m: words length, n: word length
23
- // SC: O(1)
+ // SC: O(n)
24
search(word: string): boolean {
25
const len = word.length;
26
const targetWord = word.replace(/\./g, "");
0 commit comments