CPP
\tclass Solution {\n\tpublic:\n\t\tint minDeletion(vector& nums) {\n\t\t\tif(nums.empty()) return 0;\n\t\t\tint c= 0;\n\t\t\tfor(int i = 0;i<nums.size()-1;i+=2)
\tclass Solution {\n\tpublic:\n\t\tint minDeletion(vector<int>& nums) {\n\t\t\tif(nums.empty()) return 0;\n\t\t\tint c= 0;\n\t\t\tfor(int i = 0;i<nums.size()-1;i+=2){\n\t\t\t\tif(nums[i] == nums[i+1]) {\n\t\t\t\t\ti--;\n\t\t\t\t\tc++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn c + (nums.size()-c)%2 ;\n\t\t}\n\t};
[]