Question d’entretien chez Amazon

He asked how to optimize BFS for the Word Ladder problem