present of size maxValue + 1 to keep track of which numbers are present in nums.nums and mark the corresponding indices in present as true.count to 0.i from 1 to maxValue.
i, initialize a variable currentGCD to 0.i that are present in nums (checked using present array).currentGCD to be the GCD of currentGCD and the current multiple.currentGCD equals i, increment count and break the loop.count.