Intel Corporation interview question

Write a function that reverses a node list