← ALL NOTES
Array

1979. Find Greatest Common Divisor of Array

Given integer array nums, return the greatest common divisor of its largest and smallest elements. The problem name says "of array," but only two numbers matter — the min and the max.

Loading…