A sentence explaining the next array of KMP don't understand, just choke me.

Source: Internet
Author: User

I see other special good blogs will be super wonderful but I think I personally after reading it is still a little bit (ok I also that patient read)

The following is the key sentence:

Definition: definition s[0~len-1]

The next array is next[i] the length of the longest common sequence that is the suffix of the string s[0~i] ending with s[i] and s[0].

Take a chestnut bar: abcdabcdabcdefghijkl so next[6] = 3 with s[6] as the end is ' C ' then s[0] the suffix of the entire S string is the longest public sequence is "ABC" its length is 3 so next[6] = 3

Same Next[7] = 4 Next[8] = 1

Well, for the title of my sentence, I almost got my breath out of this sentence.

The last is to read my words to see other blogs will be easier to understood some, more clear

If there is a Daniel found that I understand is wrong please leave a message (I will delete it immediately), I am also kind to help everyone.

A sentence explaining the next array of KMP don't understand, just choke me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.