class Solution { public: ListNode* ReverseList(ListNode* head) { if(!head ) return head; ListNode *first = NULL, *curr = head, *c_next; while(curr){ c_next = curr->next; curr->next = first; first = curr; curr = c_next; } return first; } };