LeetCode之Remove Duplicates from Sorted List

来源:互联网 发布:抑抑陆生,知言之贯 编辑:程序博客网 时间:2024/06/05 17:58

http://oj.leetcode.com/problems/remove-duplicates-from-sorted-list/



链表去重。需要考虑的特殊情况是: 输入为空链表,应该如何处理?

所以要用 while(head != NULL) 而不是 while(1)



0 0
原创粉丝点击