[leetcode]Remove Duplicates from Sorted Array
class Solution {public:int removeDuplicates(int A[], int n) {// Start typing your C/C++ solution below// DO NOT write int main() functionint len = 0;for(int i = 1; i < n; i++){if(A[i] == A[i-1]){len++;}else{A[i-len] = A[i];}}return n-len;}};
补充:软件开发 , C++ ,