https://oj.leetcode.com/problems/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
, return 1->2
.
Given 1->1->2->3->3
, return 1->2->3
.
'풀어본 Algorithm 문제 정리' 카테고리의 다른 글
[OJ.leetcode] merge-two-sorted-lists (0) | 2014.08.27 |
---|---|
[OJ.leetcode] single-number-ii (2) | 2014.08.27 |
[OJ.leetcode] binary-tree-preorder-traversal (1) | 2014.08.24 |
[OJ.leetcode] maximum-depth-of-binary-tree (0) | 2014.08.23 |
[OJ.leetcode] add two numbers (1) | 2014.08.21 |