LiveRamp interview question

Pretty straight forward. Basic algorithm questions.