C++ || Greedy || Clean Code
\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int n=nums.size();\n        int deletions=0;\n        for(int i=0;i+deletions+1<n
```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int n=nums.size();\n        int deletions=0;\n        for(int i=0;i+deletions+1<n;i+=2){\n            while(i+deletions+1<n and nums[i+deletions]==nums[i+deletions+1])\n                deletions++;\n        }\n        \n        \n        \n        \n        int len=n-deletions;\n        if(len%2==0){\n            return deletions;\n        }\n        \n        return deletions+1;\n    }\n};\n\n```
['Greedy', 'C']