GCD(array)

by Ricardo Fernández Serrata

Version 4 (April 9, 2021)

Download (15 downloads)

Computes the Greatest/Highest Common Divisor/Factor of an array of integers using the Euclidean (NOT Euclid's) Algorithm.

You can remove sort() overhead if the input is already sorted. If you want to find GCD without sorting, apply the Euclidean Algorithm to each pair of numbers in the array, padded with 0 if the length is an Odd number

3.0 average rating from 1 reviews

5 stars
0
4 stars
0
3 stars
1
2 stars
0
1 star
0
Reports
0

Reviews and ratings can be submitted in the app.