摘要: 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 return length =5, and A is now[1,1,2,2,3].Code:class Solution {public: int removeDuplicates(int A[], int n) { if(n<3) return n; int i=0;... 阅读全文
posted @ 2013-11-17 18:52 WinsCoder 阅读(137) 评论(0) 推荐(0) 编辑