码迷,mamicode.com
首页 >  
搜索关键字:duplicates    ( 1738个结果
LeetCode - Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2014-09-10 09:26:30    阅读次数:198
LeetCode 刷题总结
最近找工作,免不了看CC150 刷 LeetCode 来练手,练习之余也向各路大神 系统并且深入的学习、巩固一下算法知识。一. 线性表1. 数组 Remove Duplicates from Sorted Array Remove Duplicates from Sorted Array II .....
分类:其他好文   时间:2014-09-10 08:21:50    阅读次数:246
Leetcode--Subsets II
Problem Description: Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution se...
分类:其他好文   时间:2014-09-09 21:35:29    阅读次数:281
Leetcode--permutations II
Problem Description: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2...
分类:其他好文   时间:2014-09-09 16:17:29    阅读次数:200
Remove Duplicates from Sorted Array II <leetcode>
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:其他好文   时间:2014-09-09 12:23:58    阅读次数:176
【leetcode】Remove Duplicates from Sorted List II-很精简
觉着自己写的比看到的答案精简,分享一下: class Solution { public: ListNode *deleteDuplicates(ListNode *head) { if(head == NULL) return NULL; ListNode res(-1); ListNode* pre = &res; pr...
分类:其他好文   时间:2014-09-08 01:03:16    阅读次数:267
Leetcode: Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique per...
分类:其他好文   时间:2014-09-08 00:55:26    阅读次数:269
Leetcode: Subsets II
Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending order...
分类:其他好文   时间:2014-09-06 07:32:22    阅读次数:239
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2014-09-05 05:31:40    阅读次数:176
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:其他好文   时间:2014-09-05 05:31:30    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!