struct ListNode{ int val; struct ListNode *next; }; struct ListNode* reverse(struct ListNode* head) { struct ListNode* new_head = NULL, *tmpNode; while(head) { tmpNode = head->next; head->next = new_head; new_head = head; head = tmpNode; } return new_head; }
点赞 1

相关推荐

11-07 16:07
深圳大学 运营
前端飞升:学长,阿里不是卡双非吗,我深也能去吗
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务