Minimum Split Into Subarrays With GCD Greater Than One
Grow each subarray while its running gcd stays above one; cut a new subarray the moment the gcd falls to one.
Grow each subarray while its running gcd stays above one; cut a new subarray the moment the gcd falls to one.