Pregunta de entrevista de LiveRamp

Pretty straight forward. Basic algorithm questions.