LiveRamp interview question

A BFS question