LiveRamp interview question

Find all shortest paths