Solving Minimum Moves to Equal Array Elements in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Example:

Input:
[1,2,3]

Output:
3

Explanation:
Only three moves are needed (remember each move increments two elements):

[1,2,3]  =>  [2,3,3]  =>  [3,4,3]  =>  [4,4,4]

See the full details of the problem Minimum Moves to Equal Array Elements at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go