摘要: python 前面加个dummy节点,这样就不用考虑头节点的更新问题了 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None 阅读全文
posted @ 2019-07-02 19:10 NeoZy 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 俺的: class Solution: def removeDuplicates(self, nums: List[int]) -> int: if(len(nums)==0): return 0 i=0 while i<len(nums): s=i while i<len(nums) and nu 阅读全文
posted @ 2019-07-02 18:22 NeoZy 阅读(70) 评论(0) 推荐(0) 编辑