Pregunta de entrevista de LiveRamp

how to implement the algorithm that you proposed