Goldman Sachs interview question

Leet code heavy assessments, medium/hard