Pergunta de entrevista da empresa Affirm

Given two words and a dictionary, return the shortest path between two words