Amazon interview question

Word ladder