We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 26a6a8f + d28293d commit a47643dCopy full SHA for a47643d
problems/0459.重复的子字符串.md
@@ -45,7 +45,7 @@
45
46
这里就要说一说next数组了,next 数组记录的就是最长相同前后缀( [字符串:KMP算法精讲](https://programmercarl.com/0028.实现strStr.html) 这里介绍了什么是前缀,什么是后缀,什么又是最长相同前后缀), 如果 next[len - 1] != -1,则说明字符串有最长相同的前后缀(就是字符串里的前缀子串和后缀子串相同的最长长度)。
47
48
-最长相等前后缀的长度为:next[len - 1] + 1。
+最长相等前后缀的长度为:next[len - 1] + 1。(这里的next数组是以统一减一的方式计算的,因此需要+1)
49
50
数组长度为:len。
51
0 commit comments