Goldman Sachs interview question

Work on CoderPad question to calculate snowfall