Acquia interview question

Code Round 2 : Reverse linked list