Pergunta de entrevista da empresa Impact Analytics

Medium level dynamic programming question