链表反转
ListNode* reversePrint(ListNode* head) { //*******************链表反转********************* ListNode* last = nullptr; ListNode* cur = head; while(cur != nullptr){ ListNode* tmp = cur -> next; cur -> next = last; last = cur; cur = tmp; } return last; }