Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bc2b3aa

Browse files
refactor 462
1 parent c3cc881 commit bc2b3aa

File tree

1 file changed

+0
-23
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-23
lines changed

src/main/java/com/fishercoder/solutions/_462.java

-23
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,6 @@
22

33
import java.util.Arrays;
44

5-
/**
6-
* 462. Minimum Moves to Equal Array Elements II
7-
*
8-
* Given a non-empty integer array,
9-
* find the minimum number of moves required to make all array elements equal,
10-
* where a move is incrementing a selected element by 1 or decrementing a selected element by 1.
11-
*
12-
* You may assume the array's length is at most 10,000.
13-
14-
Example:
15-
16-
Input:
17-
[1,2,3]
18-
19-
Output:
20-
2
21-
22-
Explanation:
23-
Only two moves are needed (remember each move increments or decrements one element):
24-
25-
[1,2,3] => [2,2,3] => [2,2,2]
26-
*/
27-
285
public class _462 {
296

307
public static class Solution1 {

0 commit comments

Comments
 (0)