Morgan Stanley interview question

What would be an algorithm to implement a spell check program?