Easy || Short || C++
\n# Approach\n Describe your approach to solving the problem. \n1. If it equals to next element, increment ans and i by 1.\n2. Else incremenr by 2.\n3. Finally 
\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. If it equals to next element, increment ans and i by 1.\n2. Else incremenr by 2.\n3. Finally to make the array even size, again do +1.  \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(1)$$\n\n# Code\n```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int n=nums.size();\n        int i=0; int ans=0;\n        while(i < n-1) {\n            if(nums[i] == nums[i+1]) i++, ans++;\n            else i+=2;\n        }\n        if(i == n-1) return ans+1;\n        return ans;\n    }\n};\n```
['C++']