Pregunta de entrevista de Roblox

Standard HackerRank assessment focused on dynamic programming and an optimization problem.