Given an integer array nums, return the greatest common divisor of the smallest number and the largest number in nums.
Note: The greatest common divisor of two numbers is the largest positive integer that evenly divides both numbers.
Constraints:
nums.length
nums[i]
Given an integer array nums, return the greatest common divisor of the smallest number and the largest number in nums.
Note: The greatest common divisor of two numbers is the largest positive integer that evenly divides both numbers.
Constraints:
nums.length
nums[i]