You are given a nums.
An array is considered beautiful if it satisfies the following conditions:
The length of the array is even.
For every even index i such that nums.length nums[i] != nums[i + 1].
You may delete any number of elements from nums. Whenever an element is deleted, all elements to its right shift to the left by
Return the minimum number of elements that must be deleted from nums to make it beautiful.
Constraints:
nums.length
nums[i]
You are given a nums.
An array is considered beautiful if it satisfies the following conditions:
The length of the array is even.
For every even index i such that nums.length nums[i] != nums[i + 1].
You may delete any number of elements from nums. Whenever an element is deleted, all elements to its right shift to the left by
Return the minimum number of elements that must be deleted from nums to make it beautiful.
Constraints:
nums.length
nums[i]