linearList02: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 [1,1,2,2,3]
解决方法:
// 2015.7.3#includeusing namespace std;int removeDuplicates(int A[],int n);void main(){ int A[6]={1,1,1,2,2,3}; cout<<"长度是"< <