human
Minimum increment and decrement by K of each pair elements required to make all array elements equal | Function to check if its possible to make all array elements equal or not.
Stores the sum of the array.
Traverse the array.
If sum is divisible by N.
Otherwise , not possible to make all array elements equal.
Given array.
Size of the array"
Solution in Python:
assistant
#Here is code to minimum increment and decrement by K of each pair elements required to make all array elements equal and the other steps required.
 def arrayElementEqual ( arr , N ) :
	sum = 0
	for i in range ( N ) :
		sum += arr [ i ]
	if ( sum % N == 0 ) :
		print ( ' Yes ' )
	else :
		print ( " No " )
arr = [ 1 , 5 , 6 , 4 ]
N = len ( arr )
arrayElementEqual ( arr , N )