Beginner friendly Java Solution!!!
\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int deletions=0,shiftedIndex=0,numslen=nums.length;\n        for(int i=0;i<numslen;i++){\n
```\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int deletions=0,shiftedIndex=0,numslen=nums.length;\n        for(int i=0;i<numslen;i++){\n            shiftedIndex=i-deletions;\n            if(shiftedIndex%2==0){\n                if(i!=numslen-1 && nums[i]==nums[i+1])\n                    deletions+=1;\n            }\n        }\n        if((numslen-deletions)%2!=0){\n            deletions+=1;\n        }\n        return deletions;\n    }\n}\n```
['Array', 'Java']