New gem: greatest_common_factor

Ruby already provides the ability to find the greatest common factor (gcf) of two integers. What if we could determine the greatest common factor across a whole array of integers? Now we can.

I’ve just released greatest_common_factor on github.

Here is a sample of what you can do with it:

Enjoy!

Comments

Leave a Reply