According to the Six Degrees of Kevin Bacon gane anyone in Hollywood film industry can be connected to Kevin Bacon within sex steps, where each step consists of finding a film that two actors both starred in.
I utilized breadth-first search to find the shortest path from one actor to another. Utilized first-in first-out to pick the node and a neighbors_for_person function to locate the stack for the next state and action set.