Goldman Sachs interview question

coding question using stack and string, math questions cover topics such as linear algebra and calculus