#3736

Minimum Moves to Equal Array Elements III

newbie · 175 · lc easy +15 · 81.3% accepted · 35 likes · top 93%

Description

Given an integer array nums where each operation increments any single element by 1, return the minimum number of operations needed to make all elements equal.

Code

1
2
3