Pergunta de entrevista da empresa DataStax

How would you go about programming the Kevin Bacon problem?