![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LinkedList
CS番茄
这个作者很懒,什么都没留下…
展开
-
LeetCode 328. Odd Even Linked List
解法1 # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None """ 首刷 O(n)时间复杂度 顺序不能变 分开2条链 难点:停止条件是什么? """ class...原创 2018-08-16 11:26:05 · 140 阅读 · 0 评论 -
LeetCode 382. Linked List Random Node
蓄水池算法 # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def __init__(self, h...原创 2018-08-20 23:07:57 · 143 阅读 · 0 评论