LeetCode 算法——26. 删除排序数组中的重复项

class Solution {
public:
    int removeDuplicates(vector& nums) {
        size_t k=1;
        size_t i=0,j=0;
        if(nums.size()==0) return 0;
        for(j=1;j

改进:

class Solution {
public:
    int removeDuplicates(vector& nums) {
        size_t i=0,j=0;
        if(nums.size()==0) return 0;
        for(j=1;j

 

你可能感兴趣的:(LeetCode,C++)