logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

链表反转——递归

ListNode* reverseList(ListNode* head) {if(!head || !head->next){return head;}ListNode* temp=reverseList(head->next);head->next->next=head;head->next=nullptr;return temp;}

#链表#list#leetcode
到底了