SpanIdea interview question

Write a code to get reverse of list without using temporary variable.