add Knuth-Morris-Pratt Algorithm using DFA