You are given an integer array nums of length n.
In one operation, you can select a contiguous subarray nums[l...r] (where
Return the minimum number of operations required to make all elements of nums equal.
Constraints:
You are given an integer array nums of length n.
In one operation, you can select a contiguous subarray nums[l...r] (where
Return the minimum number of operations required to make all elements of nums equal.
Constraints: