Skip to content

Commit 67eacd6

Browse files
authored
typo
typo
1 parent c7f01c4 commit 67eacd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Contents/06.String/02.String-Single-Pattern-Matching/01.String-Brute-Force.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ BF 算法非常简单,容易理解,但其效率很低。主要是因为在
4343

4444
在最理想的情况下(第一次匹配直接匹配成功),BF 算法的最佳时间复杂度是 $O(m)$。
4545

46-
在一般情况下,根据等概率原则,平均搜索次数为 $\frac{(n + m)}{2}$,所以 Brute Force 算法的平均时间复杂度为 $O(n + m)$。
46+
在一般情况下,根据等概率原则,平均搜索次数为 $\frac{(n + m)}{2}$,所以 Brute Force 算法的平均时间复杂度为 $O(n × m)$。
4747

4848
## 参考资料
4949

0 commit comments

Comments
 (0)