Pergunta de entrevista da empresa Nielsen

DSA question from dynamic programming