首页 > 其他 > 详细

83. Remove Duplicates from Sorted List

时间:2017-12-30 20:55:10      阅读:202      评论:0      收藏:0      [点我收藏+]
class Solution(object):
    def deleteDuplicates(self, head):
        """
        :type head: ListNode
        :rtype: ListNode
        """
        tmp=head
        while tmp:
            while tmp.next and tmp.next.val==tmp.val:
                tmp.next=tmp.next.next
            tmp=tmp.next
        return head
        

  

83. Remove Duplicates from Sorted List

原文:https://www.cnblogs.com/xlqtlhx/p/8151053.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!