Tap here to switch tabs
Problem
Submissions

Problem: Minimum Moves to Equal Array Elements III

Try to solve the Minimum Moves to Equal Array Elements III problem.

Statement

Given an integer array nums, return the minimum number of moves required to make all elements in nums equal.

In one move, you can increment any single element of the array by 11.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Moves to Equal Array Elements III

Try to solve the Minimum Moves to Equal Array Elements III problem.

Statement

Given an integer array nums, return the minimum number of moves required to make all elements in nums equal.

In one move, you can increment any single element of the array by 11.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100