Posted on July 6, 2021July 6, 2021 Description Submission class Solution { public: int minMoves(vector<int>& nums) { int minimum = *min_element(nums.begin(), nums.end()); int ret = 0; for(auto x: nums) { ret += x - minimum; } return ret; } }; By Bill0412 Easy LeetCode