C++ | O(N) time O(1) space
\n\n\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int count=0;\n        int n=nums.size();\n        int dele=0;\n        for(in
\n\n```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int count=0;\n        int n=nums.size();\n        int dele=0;\n        for(int i=0;i<nums.size()-1;i++)\n        {\n           if((i-dele)%2==0)\n           {\n                if(nums[i]==nums[i+1])\n                {\n                    count++;\n                    dele++;\n                }\n           }\n        }\n        if((n-dele)%2)return count+1;\n        return count;\n    }\n};\n```
['C']