Replace Non-Coprime Numbers in Array
Repeatedly merge adjacent values that share a common factor into their least common multiple until no such pair remains. The visual highlights each adjacent pair and merges it on the stack.
Repeatedly merge adjacent values that share a common factor into their least common multiple until no such pair remains. The visual highlights each adjacent pair and merges it on the stack.