要三个指针
class Solution { public: ListNode* ReverseList(ListNode* pHead) { if(!pHead) return NULL; ListNode* pre=NULL; ListNode* cur=pHead; ListNode* tmp; while(cur->next){ tmp=cur->next; cur->next=pre; pre=cur; cur=tmp; } cur->next=pre; return cur; } };