Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread shady
O(n log(n)) can we do better ? On Sat, Sep 10, 2011 at 10:02 PM, sukran dhawan wrote: > after finding gcd of first two elements use gcd as first no and next array > element as second no annd call gcd function > repeat the proc till array exhausts > > On Sat, Sep 10, 2011 at 9:39 PM, Neha Singh wr

Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread Neha Singh
got it -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group

Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread sukran dhawan
after finding gcd of first two elements use gcd as first no and next array element as second no annd call gcd function repeat the proc till array exhausts On Sat, Sep 10, 2011 at 9:39 PM, Neha Singh wrote: > @sukran : we hv to find gcd of all the elements of the array, not of 2 > elements. > Give

Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread Neha Singh
@sukran : we hv to find gcd of all the elements of the array, not of 2 elements. Give detailed algo -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this grou

Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread sukran dhawan
find GCD by eucledian method LCM = (a * b )/GCD; On Sat, Sep 10, 2011 at 9:13 PM, Gaurav Menghani wrote: > http://tinyurl.com/3hm3gug > > On Sat, Sep 10, 2011 at 10:46 AM, Neha Singh > wrote: > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm

Re: [algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread Gaurav Menghani
http://tinyurl.com/3hm3gug On Sat, Sep 10, 2011 at 10:46 AM, Neha Singh wrote: > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send em

[algogeeks] Write a function to find the least common multiple of integers in an array

2011-09-10 Thread Neha Singh
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at ht