Pregunta de entrevista de LiveRamp

2 coding questions , 1 was Dynamic Programming question