o(n) solution Easy
Please upvote if you found the answer useful\nSo we have delete a value at i+1 if i is even and then nums[i]==nums[i+1],\nso according to that if we make one de
**Please upvote if you found the answer useful**\nSo we have delete a value at i+1 if i is even and then nums[i]==nums[i+1],\nso according to that if we make one deletion all the indexes of the array will move ahead by 1,\nSo if we have n no of deletions, the elements of array will move ahead by n.\nAccording to that , we can understand the code.\n```\nclass Solution:\n    def minDeletion(self, nums: List[int]) -> int:\n        count=0\n        i=0\n        for i in range(0,len(nums)-1):\n            if (i-count)%2==0 and nums[i]==nums[i+1]:\n                count+=1\n        return count+1 if (len(nums)-count)%2!=0 else count\n```
[]