✅ Best and Most Easy Explanantion || 3 line of code
\uD83D\uDC68\u200D\uD83D\uDCBB Friend\'s if you find this solution helpful \uD83D\uDE0A, PLEASE do UPVOTE. By doing that motivates me to create a better post li
\uD83D\uDC68\u200D\uD83D\uDCBB Friend\'s if you find this solution helpful \uD83D\uDE0A, PLEASE do UPVOTE. By doing that motivates me to create a better post like this \u270D\uFE0F\n____________________________________________________________________________________________________________\n____________________________________________________________________________________________________________\n\n#### \u2714\uFE0F **Question Conclusion**\n* there must be no repetitive value next to even index\n* if we found any element for the above point we have to delete the element and shift every right element to its left by 1.\n#### \u2714\uFE0F **Solution - I (Best Approach)**\n##### **Intuition :-**\n* we will fly the vector.\n* every time we find a duplicate we will increment ans by 1.\n* thus to check the second condition we will subtract the ans value from the index as we are shifting the element to the left.\n* for the last edge case we will check the remaining size after removing ans element from the vector if the result is odd we have to remove 1 more element else just return the ans.\n##### **Code :-**\n```\nclass Solution {\npublic:\n    int minDeletion(vector<int> &nums) {\n        int ans = 0;\n        for (int i = 0; i < nums.size() - 1; i++)\n            if (nums[i] == nums[i + 1] and (i - ans) % 2 == 0) ans++;\n        return ans + (nums.size() - ans) % 2;\n    }\n};\n```\n**Time Complexity** : `O(N)` time to fly the vector, \n**Space Complexity** : `O(1)` no extra space is  used, \n \n_____________________________________________________________________________________________________________\n_____________________________________________________________________________________________________________\n\n\uD83D\uDCBBIf there are any suggestions/questions in my post, comment below \uD83D\uDC47
['C']