Easy Java Solution
\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int count=0;\n        \n        for(int i=0;i<nums.length-1;i++){\n            // shifting
```\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int count=0;\n        \n        for(int i=0;i<nums.length-1;i++){\n            // shifting the index if the 1st element is removed than \n            // the index of the 2nd element will be 2-1=1 where \n            // 1 is the number of count\n            // So the new index of the element at 2nd will be now 1\n            int shiftIndex=i-count;\n            if(nums[i]==nums[i+1] && shiftIndex%2==0){\n                count++;\n            }\n        }\n        if((nums.length-count)%2!=0) count++;\n        return count;\n    }\n}\n```
['Java']