Skip to content

Least Common Multiple for a array of elements. #1154

@abhiphile

Description

@abhiphile

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);
}

Activity

mukund1606

mukund1606 commented on Jul 24, 2024

@mukund1606

Can I work on this one?

abhiphile

abhiphile commented on Jul 24, 2024

@abhiphile
Author

Yes Sure !

linked a pull request that will close this issue on Jul 25, 2024
mukund1606

mukund1606 commented on Jul 25, 2024

@mukund1606

Created a PR for LCM on array of numbers

AnshDwivedi03

AnshDwivedi03 commented on Sep 6, 2024

@AnshDwivedi03

Can i work on it

Vertabrae1

Vertabrae1 commented on Sep 18, 2024

@Vertabrae1

1

Subhrajyoti842

Subhrajyoti842 commented on Sep 23, 2024

@Subhrajyoti842

Should I do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @mukund1606@Subhrajyoti842@AnshDwivedi03@abhiphile@Vertabrae1

      Issue actions

        Least Common Multiple for a array of elements. · Issue #1154 · trekhleb/javascript-algorithms