LeetCode 83. Remove Duplicates from Sorted List
题目描述:
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example, Given
1->1->2
, return1->2
. Given1->1->2->3->3
, return1->2->3
.
删除连表中的重复元素, 比较简单. 要注意不能造成内存泄漏.
1 | /** |