You have the additional requirement that you change one character at a time, and end up building a graph of neighbors and doing BFS on it.
I would also wager that whomever was asking that sort of question would probably be looking for some optimal form of the answer, and having never encountered it, oh well.