Pregunta de entrevista de Amazon Web Services

How would you build a program to verify if a string is a valid word?