You are given an array of integers nums of size n containing nonnegative integers.
In one operation, you can perform the following actions:
Select a contiguous subarray nums[l..r] and an integer nums[i]
Set nums[i] to nums[i] == x.
Return the minimum number of operations required to convert all elements in nums to
Constraints:
n nums.length
nums[i]
You are given an array of integers nums of size n containing nonnegative integers.
In one operation, you can perform the following actions:
Select a contiguous subarray nums[l..r] and an integer nums[i]
Set nums[i] to nums[i] == x.
Return the minimum number of operations required to convert all elements in nums to
Constraints:
n nums.length
nums[i]