Goldman Sachs interview question

Reverse a link list from given tree