LiveRamp Interview Question

Normal codility exercises.