C++ || O(N) || with comments
\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int count = 0;\n            \n            for(int i = 0; i < nums.size()-1; i++){
```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int count = 0;\n            \n            for(int i = 0; i < nums.size()-1; i++){\n                if((i- count) % 2 == 0 && nums[i]==nums[i+1]){  //checking dupliactes at even index\n                        count++;                                //count deletions;\n                }\n            }\n            \n            if( (nums.size()-count)%2) return count+1;      //even size\n            return count;\n    }\n};\n```
[]