you are given an array a containing n elements and you do the following steps repeatedly. ↵
take any two elements and add their absolute difference back to the array.↵
↵
Count the number of distinct element in the array.↵
Example:↵
Array : [1,100]↵
Solution: 100
take any two elements and add their absolute difference back to the array.↵
↵
Count the number of distinct element in the array.↵
Example:↵
Array : [1,100]↵
Solution: 100