public class Solution {
public int MinMoves(int[] nums) {
var list = nums.OrderBy(x => x).ToList(); var sum = ; for (int i = ; i < list.Count; i++)
{
sum += list[i] - list[];
}
Console.WriteLine(sum);
return sum;
}
}
https://leetcode.com/problems/minimum-moves-to-equal-array-elements/#/description