Question d’entretien chez LiveRamp

How do you count the distance between two nodes in a graph when using BFS?