Assume there are 2 patterns P1 and P2 such that P1 is a substring of P2 which is nether prefix nor suffix.Then how does a KMP type on string T work Eg: P1=of P2=sofa T=sofa in this if we run aho corasick .will it detect string "of" or not
And also any good tutorial link on it will be apreciated PS:I havent implemented it yet.I was studying it and I got this doubt as I read about its implementation