Minimum Moves to Equal Array Elements
Given an integer array nums of length n. In one move, choose one element to keep unchanged and increment every other n - 1 elements by 1.
Return the minimum number of moves required to make a...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
