HCF of array of fractions (or rational numbers)
Given a fraction series. Find the H.C.F of a given fraction series. Examples: Input : [{2, 5}, {8, 9}, {16, 81}, {10, 27}] Output : 2, 405 Explanation : 2/405 is the largest number that divides all 2/5, 8/9, 16/81 and 10/27. Input : [{9, 10}, {12, 25}, {18, 35}, {21, 40}] Output : 3, 1400 Approach: