So I'm studying the failure function from this topcoder tutorial: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=stringSearching
and it said "given a string (a quite long one), find all its proper suffixes that are also prefixes of it. All we have to do is just to calculate the "failure function" of the given string and using the information stored in it to print the answer."
I couldn't figure out how I can do that with the failure function. Can anyone give some ideas?