Python - Easy
\nclass Solution:\n    def minDeletion(self, nums: List[int]) -> int:\n        \n        res = 0\n        i = 0\n        n = len(nums)\n        \n        while 
```\nclass Solution:\n    def minDeletion(self, nums: List[int]) -> int:\n        \n        res = 0\n        i = 0\n        n = len(nums)\n        \n        while i < n-1:\n            if nums[i] == nums[i+1]:\n                res += 1\n                i += 1\n            else:\n                i += 2\n            \n        if nums[n-1] == nums[n-2]:\n            res += 1\n        \n        if (n - res) % 2:\n            res += 1\n            \n        return res\n                \n```
['Python', 'Python3']