[Solved] This question is asked in a coding test. I am unable to find the solution till now [closed]


You could first think about how many operations it would cost to get all values to the highest value in the list.

In a second step you can think if there could be a better solution if you try to reach highest-value+1, highest-value+2, highest-value+3, highest-value+4 .

solved This question is asked in a coding test. I am unable to find the solution till now [closed]