Q: given an array of numbers select maximum and reduce something from it and put the modified number in array again . The minimum number of steps to consume all the numbers was asked.
Sigiloso
I used priority queue to select and modify the max. Using a simply condition on sum we can terminate the process.