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

Mahale harsh patch 1

Open MahaleHarsh opened this issue 11 months ago • 0 comments

applied the reduce method to iteratively compute the LCM across all numbers in the array, combining each pair of results. Additionally, I used the Euclidean algorithm for GCD calculation, which optimizes the LCM computation by reducing the multiplication size.

MahaleHarsh avatar Nov 06 '24 05:11 MahaleHarsh