We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8036b6f commit 3fe9825Copy full SHA for 3fe9825
matrix/matrix_equalization.py
@@ -8,6 +8,8 @@ def array_equalization(vector: list[int], k: int) -> int:
8
to a common value, by making the minimal number of
9
"updates" under the constraint of a step size (k)
10
11
+ details: https://www.geeksforgeeks.org/equalize-array-using-array-elements/
12
+
13
>>> array_equalization([1, 1, 6, 2, 4, 6, 5, 1, 7, 2, 2, 1, 7, 2, 2], 4)
14
4
15
>>> array_equalization([22, 81, 88, 71, 22, 81, 632, 81, 81, 22, 92], 2)
0 commit comments