摘要: 理论部分可参考: https://labuladong.github.io/algo/%E7%AE%97%E6%B3%95%E6%80%9D%E7%BB%B4%E7%B3%BB%E5%88%97/%E5%BF%AB%E9%80%9F%E9%80%89%E6%8B%A9.html 这里给出一个简洁的P 阅读全文
posted @ 2021-03-10 09:00 sbj123456789 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 输入一个链表,反转链表后,输出新链表的表头。 此题有四种解法,具体可参考: http://c.biancheng.net/view/8105.html 给出我个人最喜欢的一种:头插法 class Solution: # 返回ListNode def ReverseList(self, pHead): 阅读全文
posted @ 2021-03-10 03:37 sbj123456789 阅读(124) 评论(0) 推荐(0) 编辑