Goldman Sachs interview question

Solve this coding question brother.

Interview Answer

Anonymous

8 June 2021

With unoptimized code.