Pergunta de entrevista da empresa Squarepoint Capital

Two leet code style questions involving dynamic programming.