LeetCode Remove Duplicates from Sorted List
来源:互联网 发布:吊装计算软件 编辑:程序博客网 时间:2024/06/05 23:58
nothing to it.
ListNode *deleteDuplicates(ListNode *head) {if(head==NULL||head->next==NULL)return head;ListNode *p=head,*s=NULL;ListNode *q=head->next;while(q!=NULL){if (p->val!=q->val){p = q;q = q->next;}else{s = q;q = q->next;p->next = s->next;delete s;}}return head;}
0 0
- Remove Duplicates from Sorted List :from LeetCode
- Leetcode - List - Remove Duplicates from Sorted List
- [leetcode][list] Remove Duplicates from Sorted List
- [leetcode][list] Remove Duplicates from Sorted List
- LeetCode: Remove Duplicates from Sorted List
- LeetCode: Remove Duplicates from Sorted List II
- [Leetcode] Remove Duplicates from Sorted List
- [Leetcode] Remove Duplicates from Sorted List II
- LeetCode: Remove Duplicates from Sorted List
- LeetCode: Remove Duplicates from Sorted List II
- [Leetcode] Remove Duplicates from Sorted List II
- leetcode 37: Remove Duplicates from Sorted List
- [leetcode] Remove Duplicates from Sorted List II
- [LeetCode] Remove Duplicates from Sorted List II
- [LeetCode] Remove Duplicates from Sorted List
- [leetcode] Remove Duplicates from Sorted List
- [leetcode] Remove Duplicates from Sorted List II
- [LeetCode]Remove Duplicates from Sorted List
- 实现的小功能:判断报名是否重复,是返回true,否返回false.
- SAE 和 AWS 以及其它
- 基于小文件的分布式文件存储方案(JDistFS)
- java 泛型 T 和 Object 那些故事
- Oracle 11g 使用SQL Tuning Advisor调优SQL语句
- LeetCode Remove Duplicates from Sorted List
- *** -[NSUserDefaults setObject:forKey:]: Attempt to insert non-property value ‘<Student: 0x8399f70>’
- python Hadoop Streaming程序测试
- Python写的简单的端口监听,显示端口上收到的数据,TCP的
- C#正则表达式Regex类使用
- 求数组的子数组之和的最小值
- 剑指XX游戏(四) - 轻松搞定面试中的“虚”
- C语言:使用配置文件
- Java 强制类型转换(类转换注意事项)