Capchase interview question

write an O(N) keyword matching algorithm