Pregunta de entrevista de DataStax

How would you go about programming the Kevin Bacon problem?