Code exercise for an interview: spellchecker