OK so here's the problem, I have 2 files: a large text file with a wide assortment of words, and a large dictionary file containing all valid english words. I have to develop an algorithm which would check and count the number of valid english words in the large text file. OK so i know this is basically a string search problem. Using the naive search would basically never end. I though about using the finite state machine search but I'm having a little trouble with how to implement the machine.(preprocessing doesn't count BTW) I also thought about the KMP algorithm. Anyway I don't want people to write the programm for me but I woudl like a little general guidance so does anyone have any ideas?