Help needed for the below question

Revision en2, by jaivaibhav16, 2021-01-16 17:09:36

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English jaivaibhav16 2021-01-16 17:09:36 98
en1 English jaivaibhav16 2021-01-16 08:18:59 198 Initial revision (published)