Microsoft interview question

reverse a link list no extra space