Time complexity of the least common multiple (lcm) algorithm
Given two numbers a and b, the least common multiple (lcm) of a and b is the smallest number m such that both a and b are factors of m. For example, lcm(15, 21) = 105 because it is the smallest number that has both 15 and 21 as factors. Formally, we will work with the following decision problem: LCM = {a, b, m | […]