Domanda di colloquio di Amazon

He asked how to optimize BFS for the Word Ladder problem