1979. Find Greatest Common Divisor of Array

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 1979

class Solution:
    def findGCD(self, nums: List[int]) -> int:
        return gcd(max(nums), min(nums))