Java | O(N)
\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int count=0;\n       \n        for(int i=0;i<nums.length;i+=2){\n            if(i<nums.len
```\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int count=0;\n       \n        for(int i=0;i<nums.length;i+=2){\n            if(i<nums.length-1 && nums[i]==nums[i+1]){\n                count++;\n                i--;\n            }\n        }\n        \n        if((nums.length-count)%2!=0)\n            count++;\n        \n        return count;\n    }\n}\n```
['Java']