human
Sort given array to descending | Function to sort first K array elements in descending and last N - K in ascending order.
Sort the array in descending order.
Sort last ( N - K ) array elements in ascending order.
Driver Code"
Solution in Python:
 ... Give me a code to sort given array to descending and the other steps required?
assistant
#Here is code to sort given array to descending and the other steps required.
 def sortArrayInDescAsc ( arr , N , K ) :
	arr = sorted ( arr )
	arr = arr [ : : - 1 ]
	for i in arr [ : K ] :
		print ( i , end = " ▁ " )
	for i in reversed ( arr [ K : ] ) :
		print ( i , end = " ▁ " )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 7 , 6 , 8 , 9 , 0 , 1 , 2 , 2 , 1 , 8 , 9 , 6 , 7 ]
	N = len ( arr )
	K = 6
	sortArrayInDescAsc ( arr , N , K )