Skip to content

Commit 5f08d24

Browse files
committed
✨feat: Add 212
1 parent 9cd6c0c commit 5f08d24

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

LeetCode/211-220/212. 单词搜索 II(困难).md

+2-3
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ class Solution {
8989
}
9090
```
9191
* 时间复杂度:共有 $m * n$ 个起点,每次能往 $4$ 个方向搜索(不考虑重复搜索问题),且搜索的长度不会超过 $10$。整体复杂度为 $O(m * n * 4^{10})$
92-
* 空间复杂度:$O(m * n * 4^{10})$
93-
92+
* 空间复杂度:$O(\sum_{i=0}^{words.length - 1} words[i].length)$
9493

9594
---
9695

@@ -167,7 +166,7 @@ class Solution {
167166
}
168167
```
169168
* 时间复杂度:共有 $m * n$ 个起点,每次能往 $4$ 个方向搜索(不考虑重复搜索问题),且搜索的长度不会超过 $10$。整体复杂度为 $O(m * n * 4^{10})$
170-
* 空间复杂度:$O(m * n * 4^{10})$
169+
* 空间复杂度:$O(\sum_{i=0}^{words.length - 1} words[i].length * C)$,$C$ 为字符集大小,固定为 $26$
171170

172171
---
173172

0 commit comments

Comments
 (0)