Pergunta de entrevista da empresa Goldman Sachs

A very straight forward coding question and some linear algebra questions.