Amazon interview question

Leetcode 126: Word Ladder II