I believe many readers have read the online blog to explain the KMP algorithm. One of the terms that must be mentioned is: prefix. So what is the definition of the prefix that you understand in your mind? For the string "china", the prefix is: China, chin, chi, ch, c Is your idea the same as above? But I regret to tell you that the KMP prefix is ​​not like this, it is like this: Chin, chi, ch, c Is it our concept of mistaking the prefix? Do not! It’s not that we remembered it, but someone is referring to the deer as a horse. Let's reveal the true image below. It seems that the prefix of KMP is not a prefix, but a true prefix! Most (almost all) blogs use "true prefixes" to define "prefixes." The next array is a core concept of KMP, and the true prefix is ​​the core of the next array. The algorithm belongs to a very rigorous field. This important concept also refers to the behavior of deer as a horse, which should be paid attention to and avoided by us. I don't know if you have found out that none of the KMP blog posts you've seen mention the definition of a true prefix, except for the KMP algorithm that matches the string of the peak. Haha, the teacher is too careless. At the beginning of the article, the teacher has already said that he read the Jake Boxer article to understand KMP. What is the original text? Ic Pmic,Pmic Full Half Bridge Drivers,Pmic Gate Drivers,Integrated Circuits Ics Pmic Shenzhen Kaixuanye Technology Co., Ltd. , https://www.iconlinekxys.com