Time-O(n) Space-O(1) || Beginners friendly
\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int result=0;\n        int i;\n        for( i=0;i<nums.size()-1;)\n        {\n   
```\nclass Solution {\npublic:\n    int minDeletion(vector<int>& nums) {\n        int result=0;\n        int i;\n        for( i=0;i<nums.size()-1;)\n        {\n           \n            if(nums[i]==nums[i+1])\n            {\n                i++;\n                result++;\n            }\n            else\n            {\n               i+=2;\n                \n             }\n        }\n        if(i==nums.size()-1)\n        {\n            result++;\n          \n        }\n        \n        \n        return result;\n    }\n};\n```\n**Like it? Please Upvote ;-)**
['C', 'C++']