✅✅✅✅Minimum Deletions to Make Array Beautiful
\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) \n    {\n        int n=nums.size();\n        int count=0;\n        vector<int>v;\n        in
```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) \n    {\n        int n=nums.size();\n        int count=0;\n        vector<int>v;\n        int f=1;\n        for(int i=0;i<n-1;i++)\n        {\n            //cheak even position\n            if(i%2==0 && nums[i]==nums[i+1] && f==1){\n                count++;f=0;\n            }\n            //cheak odd position because of shifting\n            if(i%2==1 && nums[i]==nums[i+1] && f==0){\n                count++;f=1;\n            }\n            \n        }\n        \n        //count =>we have to remove numbers\n     \n      \n        // if count is even and size is odd then remove extra one to make size even (odd-even=odd)\n        if(n%2==1 && count%2==0)\n            return count+1;\n        \n        //similarly count+1==even\n        else if(n%2==0 && count%2==1)\n            return count+1;\n        \n        else\n            return count;\n\n    }\n    \n};\n```
['C', 'C++']