So I have a homework assignment where I'm supposed to find out the total number of comparisons (both successful and unsuccessful) the will be made by using the KMP sting matching algorithm when searching for the pattern AAAAAB in a text of 1100 A's.
I have tried constructing my next-j table, which I have to be: 000001 so far. Is this correct? But I am pretty much stuck from there.
Can someone help me/give me hints as to how I can determine how to check how many comparisons, please?