Pergunta de entrevista da empresa Google

array problem and dynamic programming problem