Combine Numbers
For this problem we ask you to compute the largest value that can be created by combining subarrays.
Subarrays can be combined if 2 adjacent numbers in the array share a common factor greater than 1, then the 2 numbers can be summed into 1 number.
Using this operation determine the largest value that can be created.
nums = [2, 1, 2, 4, 2, 4]
12
1 <= nums.length <= 5001 <= nums[i] <= 100000