Java - Simple , Easy and 100% faster O(N) Time O(1) Space
If nums length is 0 , no need to delete so return 0.\nelse\nstart with 0 index and check if i and i+1 are less than n and if nums[i] & nums[i+1] are not equals 
If nums length is 0 , no need to delete so return 0.\nelse\nstart with 0 index and check if i and i+1 are less than n and if nums[i] & nums[i+1] are not equals we don\'t need to delete i or i+1 so make i = i+2 .\nif nums[i] & nums[i+1] are equals then we have to delete either i or i+1 . Instead of doing deleting just increase the ans by 1 and make i = i+1.\nIn the end, check if size after deleting is even or not and if even return ans and if odd return ans+1.\n\nExample:\nConsider nums = [1,1,2,3,5]\n\nwhen i =0 & i+1 = 1 , both nums[i] & nums[i+1] are same so we need to delete any of them . Instead of directly deleting imagine you delete the number at i= 0, after that imagination your remaining elements [1,2,3,5] all will move leftwards by 1 index . Instead of wasting operation on deletion just increase your i by 1 as now element at index i=1 is the new start for comparision ( nums[i] != nums[i+1] ) .\n\n```\nclass Solution {\n    public int minDeletion(int[] nums) {\n        \n        if(nums.length == 0)\n            return 0;\n        \n        int n = nums.length;\n        int i = 0;\n        int ans = 0;\n        \n        while( i < n && i+1 < n)\n        {\n            if(nums[i] != nums[i+1])\n                i = i+2;\n            else\n            {\n                i++;\n                ans++;\n            }\n        }\n        \n        if( (n - ans) %2 == 0)\n            return ans;\n        else\n            return ans+1;\n    }\n}\n\n```
['Greedy', 'Java']