Hi, I got this question in the HackWithInfy Round2 and wasn't able to come up with an approach. It would be great if anyone could suggest me the approach to solve this.
Given an integer(n) denoting the no. of particles initially Given an array of sizes of these particles These particles can go into any number of simulations (possibly none) In one simulation two particles combine to give another particle with size as the difference between the size of them (possibly 0). Find the smallest particle that can be formed.
30 10 8
Explanation- 10 — 8 is the smallest we can achieve
30 27 26 10 6
Any help would be appreciated.