javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Least Common Multiple for a array of elements.

Open abhiphile opened this issue 1 year ago • 6 comments

It will be better to also have a leastCommonMultiple function for an array where I could pass an array of elements and get the result.

export default function leastCommonMultiple(a, b) {
  return ((a === 0) || (b === 0)) ? 0 : Math.abs(a * b) / euclideanAlgorithm(a, b);
}

abhiphile avatar Jul 20 '24 10:07 abhiphile

Can I work on this one?

mukund1606 avatar Jul 24 '24 19:07 mukund1606

Yes Sure !

abhiphile avatar Jul 24 '24 20:07 abhiphile

Created a PR for LCM on array of numbers

mukund1606 avatar Jul 25 '24 06:07 mukund1606

Can i work on it

AnshDwivedi03 avatar Sep 06 '24 09:09 AnshDwivedi03

1

Vertabrae1 avatar Sep 18 '24 09:09 Vertabrae1

Should I do it?

Subhrajyoti842 avatar Sep 23 '24 19:09 Subhrajyoti842