Pergunta de entrevista da empresa LiveRamp

How can you speed up breadth first search given a specific start and end node?