Java | Single Pointer | O(n) time, O(1) space
We simply check if the next element is equal to the current.\n1. If it is equals, we delete the current element and add one to our ans.\n2. If it is not equal, 
We simply check if the next element is equal to the current.\n1. If it is equals, we delete the current element and add one to our `ans`.\n2. If it is not equal, we increase the current index by `2`.\n3. At the end, if index is the last element of the array, then we know we must remove it to make the final array even size.\n\n\n```\nclass Solution {\n    public int minDeletion(int[] nums) {\n        int i=0; int ans=0;\n        while(i<nums.length-1) {\n            if(nums[i] == nums[i+1]) {\n                i++;\n                ans++;\n            } else {\n                i+=2;\n            }\n        }\n        if(i == nums.length-1) return ans+1;\n        return ans;\n    }\n}\n```\n\nUpvote if you like this solution
[]