LeetCode p83 Remove Duplicates from Sorted List 题解
1.题目:
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
题意:
去掉一个有序链表中重复的数。
2.解题思路:
见代码
3.代码
1 |
|