Goldman Sachs Interview Question

Reverse a link list from given tree