You are given an array nums consisting of positive integers.
In one operation, you can select an index i such that nums.length nums[i] or nums[i + 1] with the greatest common divisor of nums[i] and nums[i + 1].
Return the minimum number of operations required to make all elements in nums equal to
Constraints:
nums.length
nums[i]
You are given an array nums consisting of positive integers.
In one operation, you can select an index i such that nums.length nums[i] or nums[i + 1] with the greatest common divisor of nums[i] and nums[i + 1].
Return the minimum number of operations required to make all elements in nums equal to
Constraints:
nums.length
nums[i]