www

导航

2017年9月19日 #

单链表反转

摘要: 1 ListNode* Reverse(ListNode *head) 2 { 3 if (head == nullptr || head->next == nullptr) 4 return head; 5 6 ListNode *p = head, *q = head->next; 7 p->next = nullptr; 8 ... 阅读全文

posted @ 2017-09-19 09:51 www_practice 阅读(119) 评论(0) 推荐(0) 编辑