Varonis Systems interview question

implement a function that returns the reversed linked list it gets