Amazon Interview Question

string searching algorithm (knuth morris pratt but they accepted O(n^2) brute force)