Nokia interview question

Code Write C++ code for reverse a list without extra space