1979. Find Greatest Common Divisor of Array
https://leetcode.com/problems/find-greatest-common-divisor-of-array
Description
Given an integer array nums
, returnthe greatest common divisor of the smallest number and largest number in nums
.
The greatest common divisor of two numbers is the largest positive integer that evenly divides both numbers.
Example 1:
Example 2:
Example 3:
Constraints:
2 <= nums.length <= 1000
1 <= nums[i] <= 1000
ac
Last updated