Skip to content

Latest commit

 

History

History

0082

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除链表中所有存在数字重复情况的节点,只保留原始链表中 没有重复出现 的数字。

返回同样按升序排列的结果链表。

示例 1: 1 - 2 - 3 - 3 - 4 - 4 - 5 1 - 2 - 5

输入:head = [1,2,3,3,4,4,5] 输出:[1,2,5]

示例 2: 1 - 1 - 1 - 2 - 3 2 - 3

输入:head = [1,1,1,2,3] 输出:[2,3]