human
Reorder an array such that sum of left half is not equal to sum of right half | Function to print the required reordering of the array if possible.
Sort the array in increasing order.
If all elements are equal , then it is not possible.
Else print the sorted array arr [ ].
Driver Code.
Given array.
Function Call"
Solution in Python:

Give me a code to reorder an array such that sum of left half is not equal to sum of right half and the other steps required?
assistant
#Here is code to reorder an array such that sum of left half is not equal to sum of right half and the other steps required.
 def printArr ( arr , n ) :
	arr . sort ( )
	if ( arr [ 0 ] == arr [ n - 1 ] ) :
		print ( " No " )
	else :
		print ( " Yes " )
		for i in range ( n ) :
			print ( arr [ i ] , end = " ▁ " )
		print ( )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 1 , 2 , 2 , 1 , 3 , 1 ]
	N = len ( arr )
	printArr ( arr , N )