linkin
April 18th, 2009, 02:32 PM
I was wondering if there is algorithm that finds Least Common Multiple (lcm) in fastest way.
Suppose I have numbers, and all multiples are pregenerated in two-dimensional array
Multiples of 5 - 10, 15, 20, 25, 30, 35, 40,...
Multiples of 6 - 12, 18, 24, 30, 36, 42, 48,...
Multiples of 15 - 30, 45, 60, 75, 90,....
basically finding 30 in the array given above, for 3 integers (5, 6, 15)
what algorithms would be the most efficient (and fastest) to find LCM for given numbers?
thanks in advance
Suppose I have numbers, and all multiples are pregenerated in two-dimensional array
Multiples of 5 - 10, 15, 20, 25, 30, 35, 40,...
Multiples of 6 - 12, 18, 24, 30, 36, 42, 48,...
Multiples of 15 - 30, 45, 60, 75, 90,....
basically finding 30 in the array given above, for 3 integers (5, 6, 15)
what algorithms would be the most efficient (and fastest) to find LCM for given numbers?
thanks in advance