public void Test4() { //Arrange var arr = new int[] { 4, 16, 22, 304, 222, 915, 0, 0 }; var expected = 1443; //Act var sol = new MinimumMovesToEqualArrayElements2.Solution(); var res = sol.MinMoves2(arr); //Assert Assert.AreEqual(expected, res); }
public void Test5() { //Arrange var arr = new int[] { 3 }; var expected = 0; //Act var sol = new MinimumMovesToEqualArrayElements2.Solution(); var res = sol.MinMoves2(arr); //Assert Assert.AreEqual(expected, res); }
public void Test3() { //Arrange var arr = new int[] { 1, 2, 3, 5, 7, 10, 4, 16, 22, 304, 222, 915, 0, 0, 6, 66, 8 }; var expected = 1542; //Act var sol = new MinimumMovesToEqualArrayElements2.Solution(); var res = sol.MinMoves2(arr); //Assert Assert.AreEqual(expected, res); }