Create kmp

kmp algorithm needs O(m) time to preprocess the fail array(the array P) where m is the length of pattern string(the string B), needs O(n) time to do match where n is the length of text string(the string A).