Find the Shift Index After Removal
\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int del = 0;\n        int n = nums.length;\n        \n        for(int i = 0; i < nums.leng
```\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int del = 0;\n        int n = nums.length;\n        \n        for(int i = 0; i < nums.length-1; i++){\n            int shiftIndex = (i - del);\n            if(nums[i] == nums[i+1] && shiftIndex % 2 == 0){\n                del++;\n            }\n        }\n        if((n - del) % 2 == 1){\n            del++;\n        }\n        return del;\n    }\n}\n```
[]