- 博客(5)
- 收藏
- 关注
原创 LeetCode—Remove Duplicates from Sorted Array II
题目:Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function should return length = 5, and A is now
2014-11-24 20:20:48 325
原创 LeetCode—Remove Duplicates from Sorted Array
题目Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in plac
2014-11-24 19:31:11 331
原创 LeetCode—Swap Nodes in Pairs
题目:Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant
2014-11-10 16:39:26 354
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人