Very basic C++ approach using flag
\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int c=0;\n        bool flag=true;\n        cout<<flag<<endl;\n        for(int i=0
```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int c=0;\n        bool flag=true;\n        cout<<flag<<endl;\n        for(int i=0;i<nums.size()-1;i++){\n            if(flag){\n                if(nums[i]==nums[i+1]){c++;continue;}\n            }\n            flag=!flag;\n        }\n        if((nums.size()-c)%2)return c+1;\n        return c;\n    }\n};\n```
['C']